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.
1 parent f00444b commit 706dbafCopy full SHA for 706dbaf
art/defences/detector/poison/activation_defence.py
@@ -671,7 +671,7 @@ def _check_params(self):
671
raise ValueError("Unsupported method for cluster analysis method: " + self.cluster_analysis)
672
if self.generator and not isinstance(self.generator, DataGenerator):
673
raise TypeError("Generator must a an instance of DataGenerator")
674
- if self.ex_re_threshold and self.ex_re_threshold <= 0:
+ if self.ex_re_threshold is not None and self.ex_re_threshold <= 0:
675
raise ValueError("Exclusionary reclassification threshold must be positive")
676
677
def _get_activations(self, x_train: Optional[np.ndarray] = None) -> np.ndarray:
0 commit comments