Skip to content

Commit 036cc9f

Browse files
author
TrojAISec
committed
forgot to use num_outputs
1 parent 78733e4 commit 036cc9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/estimators/classification/pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def hook(grad):
593593
else:
594594
num_outputs = self.nb_classes
595595

596-
for i in range(self.nb_classes):
596+
for i in range(num_outputs):
597597
torch.autograd.backward(
598598
preds[:, i],
599599
torch.tensor([1.0] * len(preds[:, 0])).to(self._device),

0 commit comments

Comments
 (0)