File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ def generate( # type: ignore
512
512
raise ValueError ("Masks can only be used if the `patch_location` is `None`." )
513
513
514
514
if y is None and self .targeted :
515
- raise ValueError ("The targeted version of AdversarialPatch attack requires provided target labels." )
515
+ raise ValueError ("The targeted version of AdversarialPatch attack requires provided target labels." )
516
516
517
517
if hasattr (self .estimator , "nb_classes" ):
518
518
Original file line number Diff line number Diff line change @@ -155,7 +155,9 @@ def generate( # type: ignore
155
155
if y is None and self .targeted :
156
156
raise ValueError ("The targeted version of RobustDPatch attack requires target labels provided to `y`." )
157
157
if y is not None and not self .targeted :
158
- raise ValueError ("The untargeted version of RobustDPatch attack does not use target labels provided to 'y'." )
158
+ raise ValueError (
159
+ "The untargeted version of RobustDPatch attack does not use target labels provided to 'y'."
160
+ )
159
161
if x .ndim != 4 : # pragma: no cover
160
162
raise ValueError ("The adversarial patch can only be applied to images." )
161
163
You can’t perform that action at this time.
0 commit comments