52Hz commited on
Commit
714b0bc
·
1 Parent(s): b97e969

Update main_test_CMFNet.py

Browse files
Files changed (1) hide show
  1. main_test_CMFNet.py +2 -1
main_test_CMFNet.py CHANGED
@@ -53,10 +53,11 @@ def main():
53
  padh = H - h if h % mul != 0 else 0
54
  padw = W - w if w % mul != 0 else 0
55
  input_ = F.pad(input_, (0, padw, 0, padh), 'reflect')
 
56
  with torch.no_grad():
57
  restored = model(input_)
58
 
59
- restored = torch.clamp(restored[1], 0, 1)
60
  restored = restored[:, :, :h, :w]
61
  restored = restored.permute(0, 2, 3, 1).cpu().detach().numpy()
62
  restored = img_as_ubyte(restored[0])
 
53
  padh = H - h if h % mul != 0 else 0
54
  padw = W - w if w % mul != 0 else 0
55
  input_ = F.pad(input_, (0, padw, 0, padh), 'reflect')
56
+
57
  with torch.no_grad():
58
  restored = model(input_)
59
 
60
+ restored = torch.clamp(restored, 0, 1)
61
  restored = restored[:, :, :h, :w]
62
  restored = restored.permute(0, 2, 3, 1).cpu().detach().numpy()
63
  restored = img_as_ubyte(restored[0])