Skip to content

Commit

Permalink
Fixed bug when using a non-zero lower bound
Browse files Browse the repository at this point in the history
  • Loading branch information
whg1g15 committed Aug 7, 2017
1 parent 7e4e596 commit 1b16779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion foolbox/attacks/contrast.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ContrastReductionAttack(Attack):
def _apply(self, a, epsilons=1000):
image = a.original_image
min_, max_ = a.bounds()
target = (max_ - min_) / 2
target = (max_ + min_) / 2

if not isinstance(epsilons, Iterable):
epsilons = np.linspace(0, 1, num=epsilons + 1)[1:]
Expand Down

0 comments on commit 1b16779

Please sign in to comment.