Fix gpu option
This commit is contained in:
parent
202453d6c5
commit
6ba6cfe1ff
|
@ -276,6 +276,7 @@ local function waifu2x()
|
||||||
if opt.thread > 0 then
|
if opt.thread > 0 then
|
||||||
torch.setnumthreads(opt.thread)
|
torch.setnumthreads(opt.thread)
|
||||||
end
|
end
|
||||||
|
cutorch.setDevice(opt.gpu)
|
||||||
if cudnn then
|
if cudnn then
|
||||||
cudnn.fastest = true
|
cudnn.fastest = true
|
||||||
if opt.l:len() > 0 then
|
if opt.l:len() > 0 then
|
||||||
|
@ -293,6 +294,5 @@ local function waifu2x()
|
||||||
else
|
else
|
||||||
convert_frames(opt)
|
convert_frames(opt)
|
||||||
end
|
end
|
||||||
cutorch.setDevice(opt.gpu)
|
|
||||||
end
|
end
|
||||||
waifu2x()
|
waifu2x()
|
||||||
|
|
Loading…
Reference in a new issue