Skip to content

Commit

Permalink
Update inference.py
Browse files Browse the repository at this point in the history
remove torch.no_grad()
  • Loading branch information
mileistone authored Oct 27, 2020
1 parent 345db0f commit 2bf7bfd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flexinfer/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ def __call__(self, imgs):
Returns:
outp (torch.float32)
"""
with torch.no_grad():
imgs = imgs.cuda()
outp = self.model(imgs)
imgs = imgs.cuda()
outp = self.model(imgs)

return outp

Expand Down

0 comments on commit 2bf7bfd

Please sign in to comment.