Skip to content

Commit b1d12cf

Browse files
authored
Merge branch 'dev_1.15.0' into object-detector-resize
2 parents ae4ab18 + bbb92cf commit b1d12cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _generate_batch(
269269
inputs = x.to(self.estimator.device)
270270
targets = targets.to(self.estimator.device)
271271
adv_x = torch.clone(inputs)
272-
momentum = torch.zeros(inputs.shape)
272+
momentum = torch.zeros(inputs.shape).to(self.estimator.device)
273273

274274
if mask is not None:
275275
mask = mask.to(self.estimator.device)

0 commit comments

Comments
 (0)