Skip to content

Commit

Permalink
Merge pull request #1217 from xu-weizhen/patch-1
Browse files Browse the repository at this point in the history
Update semantic.py
  • Loading branch information
alkaet committed Sep 12, 2021
2 parents c83898f + 6d27e45 commit b54cb0a
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 b54cb0a

Please sign in to comment.