Skip to content

Commit

Permalink
added missing cuda call in pytorch model (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrauber committed Jun 20, 2017
1 parent 02230ed commit cb27d1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions foolbox/models/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def predictions_and_gradient(self, image, label):

target = np.array([label])
target = torch.from_numpy(target)
if self.cuda: # pragma: no cover
target = target.cuda()
target = Variable(target)

assert image.ndim == 3
Expand Down

0 comments on commit cb27d1c

Please sign in to comment.