Skip to content

Commit

Permalink
Update semantic.py
Browse files Browse the repository at this point in the history
Correct errors.
  • Loading branch information
xu-weizhen authored Sep 12, 2021
1 parent c83898f commit 6d27e45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cleverhans/torch/attacks/semantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ def semantic(x, center=True, max_val=1.0):
Maximum value allowed in the input data.
"""

if self.center:
if center:
return x * -1
return self.max_val - x
return max_val - x

0 comments on commit 6d27e45

Please sign in to comment.