XiangZ commited on
Commit
58d1c2c
·
verified ·
1 Parent(s): 2e01b14

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -62,7 +62,8 @@ model = model.from_pretrained(repo_name)
62
  model.to(device)
63
 
64
  # test and save results
65
- sr_results = model.infer_image("path-to-input-image", device=device)
 
66
  cv2.imwrite("path-to-output-location", sr_results)
67
  ```
68
 
 
62
  model.to(device)
63
 
64
  # test and save results
65
+ with torch.no_grad():
66
+ sr_results = model.infer_image("path-to-input-image", device=device)
67
  cv2.imwrite("path-to-output-location", sr_results)
68
  ```
69