From 6ba6cfe1ffd483d1e98e710e5a773af3067b1aeb Mon Sep 17 00:00:00 2001 From: nagadomi Date: Sat, 1 Apr 2017 03:55:09 +0900 Subject: [PATCH] Fix gpu option --- waifu2x.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waifu2x.lua b/waifu2x.lua index 8e48937..05c164e 100644 --- a/waifu2x.lua +++ b/waifu2x.lua @@ -276,6 +276,7 @@ local function waifu2x() if opt.thread > 0 then torch.setnumthreads(opt.thread) end + cutorch.setDevice(opt.gpu) if cudnn then cudnn.fastest = true if opt.l:len() > 0 then @@ -293,6 +294,5 @@ local function waifu2x() else convert_frames(opt) end - cutorch.setDevice(opt.gpu) end waifu2x()