Skip to content

Commit

Permalink
Merge pull request #1897 from Trusted-AI/development_boundary_attack
Browse files Browse the repository at this point in the history
Remove check from BoundaryAttack to enable binary classification
  • Loading branch information
beat-buesser committed Nov 9, 2022
2 parents ef53a70 + c1377de commit 4e226f2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions art/attacks/evasion/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ def generate(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> n

y = check_and_transform_label_format(y, nb_classes=self.estimator.nb_classes, return_one_hot=False)

if y is not None and self.estimator.nb_classes == 2 and y.shape[1] == 1:
raise ValueError( # pragma: no cover
"This attack has not yet been tested for binary classification with a single output classifier."
)

# Get clip_min and clip_max from the classifier or infer them from data
if self.estimator.clip_values is not None:
clip_min, clip_max = self.estimator.clip_values
Expand Down

0 comments on commit 4e226f2

Please sign in to comment.