Skip to content

Commit 706dbaf

Browse files
Update art/defences/detector/poison/activation_defence.py
Co-authored-by: Beat Buesser <[email protected]>
1 parent f00444b commit 706dbaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/defences/detector/poison/activation_defence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def _check_params(self):
671671
raise ValueError("Unsupported method for cluster analysis method: " + self.cluster_analysis)
672672
if self.generator and not isinstance(self.generator, DataGenerator):
673673
raise TypeError("Generator must a an instance of DataGenerator")
674-
if self.ex_re_threshold and self.ex_re_threshold <= 0:
674+
if self.ex_re_threshold is not None and self.ex_re_threshold <= 0:
675675
raise ValueError("Exclusionary reclassification threshold must be positive")
676676

677677
def _get_activations(self, x_train: Optional[np.ndarray] = None) -> np.ndarray:

0 commit comments

Comments
 (0)