Skip to content

Commit

Permalink
Merge pull request #1154 from loopylangur/loopylangur-patch-1
Browse files Browse the repository at this point in the history
Update thresholds in test_attacks.py
  • Loading branch information
jonasguan authored Jan 18, 2021
2 parents 6d71411 + 59d7707 commit d8f5ef7
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 d8f5ef7

Please sign in to comment.