Skip to content

Commit c1377de

Browse files
author
Beat Buesser
committed
Remove check from BoundaryAttack to enable binary classification
Signed-off-by: Beat Buesser <[email protected]>
1 parent ef53a70 commit c1377de

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

art/attacks/evasion/boundary.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ def generate(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> n
133133

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

136-
if y is not None and self.estimator.nb_classes == 2 and y.shape[1] == 1:
137-
raise ValueError( # pragma: no cover
138-
"This attack has not yet been tested for binary classification with a single output classifier."
139-
)
140-
141136
# Get clip_min and clip_max from the classifier or infer them from data
142137
if self.estimator.clip_values is not None:
143138
clip_min, clip_max = self.estimator.clip_values

0 commit comments

Comments
 (0)