Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Initialize modifier, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
chunchentu authored Jan 31, 2020
1 parent ba5f894 commit d9e94f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blackbox_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ def attack(self, img, lab):
self.stage = 0

self.eval_costs = 0

self.real_modifier.fill(0.0)

#np.random.seed(1234)
attack_begin_time = time.time()
for iteration in range(self.MAX_ITER):
Expand All @@ -272,7 +273,7 @@ def attack(self, img, lab):

# reset ADAM states when a valid example has been found
if loss1 == 0.0 and last_loss1 != 0.0 and self.stage == 0:
# we have reached the fine tunning point
# we have reached the fine tuning point
# reset ADAM to avoid overshoot

print("##### Reset ADAM #####")
Expand Down

0 comments on commit d9e94f3

Please sign in to comment.