We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a79c797 + f6e7c2c commit 0261594Copy full SHA for 0261594
art/attacks/poisoning/sleeper_agent_attack.py
@@ -229,6 +229,11 @@ def poison( # type: ignore
229
best_B = B_ # pylint: disable=C0103
230
best_x_poisoned = x_poisoned
231
best_indices_poison = self.indices_poison
232
+ if best_B == np.finfo(np.float32).max:
233
+ logger.warning("Attack unsuccessful: all loss values were non-finite. Defaulting to final trial.")
234
+ best_B = B_ # pylint: disable=C0103
235
+ best_x_poisoned = x_poisoned
236
+ best_indices_poison = self.indices_poison
237
238
# Apply De-Normalization
239
if isinstance(
0 commit comments