فهرست منبع

Fix gpu option

nagadomi 8 سال پیش
والد
کامیت
6ba6cfe1ff
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      waifu2x.lua

+ 1 - 1
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()