Skip to content

Commit

Permalink
Add model build to constructor of BIM/Madry
Browse files Browse the repository at this point in the history
  • Loading branch information
carlini committed Nov 20, 2018
1 parent b2a1655 commit 5f9da80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests_tf/test_attacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,6 @@ class TestMomentumIterativeMethod(TestProjectedGradientDescent):
def setUp(self):
super(TestMomentumIterativeMethod, self).setUp()

self.sess = tf.Session()
self.model = SimpleModel()
self.attack = MomentumIterativeMethod(self.model, sess=self.sess)

def test_generate_np_can_be_called_with_different_decay_factor(self):
Expand All @@ -983,6 +981,8 @@ def test_multiple_initial_random_step(self):
class TestMadryEtAl(CleverHansTest):
def setUp(self):
super(TestMadryEtAl, self).setUp()
self.model = DummyModel('madryetal_dummy_model')
self.sess = tf.Session()

def test_attack_can_be_constructed(self):
ok = True
Expand All @@ -996,6 +996,8 @@ def test_attack_can_be_constructed(self):
class TestBasicIterativeMethod(CleverHansTest):
def setUp(self):
super(TestBasicIterativeMethod, self).setUp()
self.model = DummyModel('bim_dummy_model')
self.sess = tf.Session()

def test_attack_can_be_constructed(self):
ok = True
Expand Down

0 comments on commit 5f9da80

Please sign in to comment.