charlesnchr commited on
Commit
4c59c61
1 Parent(s): 3715c63

CPU compatible

Browse files
Files changed (1) hide show
  1. NNfunctions.py +1 -4
NNfunctions.py CHANGED
@@ -266,10 +266,7 @@ def EvaluateModel(net,opt,stack):
266
  inputimg = inputimg.unsqueeze(0)
267
 
268
  with torch.no_grad():
269
- if opt.cpu:
270
- sr = net(inputimg)
271
- else:
272
- sr = net(inputimg.cuda())
273
  sr = sr.cpu()
274
  sr = torch.clamp(sr,min=0,max=1)
275
  print('min max',inputimg.min(),inputimg.max())
266
  inputimg = inputimg.unsqueeze(0)
267
 
268
  with torch.no_grad():
269
+ sr = net(inputimg.to(opt.device))
 
 
 
270
  sr = sr.cpu()
271
  sr = torch.clamp(sr,min=0,max=1)
272
  print('min max',inputimg.min(),inputimg.max())