Skip to content

Commit

Permalink
Update thresholds in test_attacks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
loopylangur authored Mar 27, 2020
1 parent f1d2336 commit 59d7707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests_tf/test_attacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ def test_attack_strength(self):

orig_labs = np.argmax(self.sess.run(self.model.get_logits(x_val)), axis=1)
new_labs = np.argmax(self.sess.run(self.model.get_logits(x_adv)), axis=1)
self.assertLess(np.mean(orig_labs == new_labs), 0.4)
self.assertLess(np.mean(orig_labs == new_labs), 0.5)
self.assertGreater(np.mean(orig_labs == new_labs), 0.2)

def test_grad_clip(self):
Expand Down Expand Up @@ -1711,4 +1711,4 @@ def test_generate_targeted_l2(self):

new_labs = np.argmax(self.sess.run(self.model.get_logits(x_adv)), axis=1)
self.assertTrue(np.mean(np.argmax(y_target, axis=1) == new_labs)
> 0.9)
> 0.9)

0 comments on commit 59d7707

Please sign in to comment.