Skip to content

Commit

Permalink
Merge pull request #2003 from twosixlabs/develop
Browse files Browse the repository at this point in the history
patch to poison.py to yield a bugfix release
  • Loading branch information
mwartell authored Nov 14, 2023
2 parents 629d77b + 7d0eeec commit 1131ead
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion armory/scenarios/poison.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def poison_dataset(self, x, y, return_index=False, fraction=None):
poison_x, poison_y = list(x), list(y)
poison_index = self.get_poison_index(y, fraction=fraction)
for i in poison_index:
poison_x_i, poison_y[i] = self.attack.poison(x[i], [self.target_class])
poison_x_i, poison_y_i = self.attack.poison(x[i], [self.target_class])
poison_x[i] = np.asarray(poison_x_i, dtype=x[i].dtype)
poison_y[i] = poison_y_i[0]
poison_x, poison_y = np.array(poison_x), np.array(poison_y, dtype=int)

if return_index:
Expand Down

0 comments on commit 1131ead

Please sign in to comment.