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
512512 raise ValueError ("Masks can only be used if the `patch_location` is `None`." )
513513
514514 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." )
516516
517517 if hasattr (self .estimator , "nb_classes" ):
518518
Original file line number Diff line number Diff line change @@ -155,7 +155,9 @@ def generate( # type: ignore
155155 if y is None and self .targeted :
156156 raise ValueError ("The targeted version of RobustDPatch attack requires target labels provided to `y`." )
157157 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+ )
159161 if x .ndim != 4 : # pragma: no cover
160162 raise ValueError ("The adversarial patch can only be applied to images." )
161163
You can’t perform that action at this time.
0 commit comments