@@ -138,7 +138,6 @@ def test_4_tensorflow_mnist(self):
138138 0.0 ,
139139 ]
140140 )
141- print (x_test_adv [0 , 14 , :, 0 ])
142141 np .testing .assert_array_almost_equal (x_test_adv [0 , 14 , :, 0 ], expected_x_test_adv , decimal = 6 )
143142 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
144143 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
@@ -244,7 +243,6 @@ def test_4_tensorflow_mnist(self):
244243 0.0 ,
245244 ]
246245 )
247- print (x_test_adv [0 , 14 , :, 0 ])
248246 np .testing .assert_array_almost_equal (x_test_adv [0 , 14 , :, 0 ], expected_x_test_adv , decimal = 6 )
249247 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
250248 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
@@ -403,7 +401,6 @@ def test_6_pytorch_mnist(self):
403401 0.0 ,
404402 ]
405403 )
406- print (x_test_adv [2 , 0 , :, 14 ])
407404 np .testing .assert_array_almost_equal (x_test_adv [2 , 0 , :, 14 ], expected_x_test_adv , decimal = 6 )
408405 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
409406 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
@@ -568,9 +565,7 @@ def test_3_tensorflow_iris(self):
568565 attack = ElasticNet (classifier , targeted = False , max_iter = 10 , verbose = False )
569566 x_test_adv = attack .generate (self .x_test_iris )
570567 expected_x_test_adv = np .asarray ([0.84810126 , 0.43320203 , 0.70404345 , 0.29160658 ])
571- print (x_test_adv [0 , :])
572568 np .testing .assert_array_almost_equal (x_test_adv [0 , :], expected_x_test_adv , decimal = 6 )
573- print (np .amax (x_test_adv ))
574569 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
575570 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
576571
@@ -635,7 +630,6 @@ def test_3_tensorflow_iris(self):
635630 attack = ElasticNet (classifier , targeted = True , max_iter = 10 , verbose = False )
636631 x_test_adv = attack .generate (self .x_test_iris , ** {"y" : targets })
637632 expected_x_test_adv = np .asarray ([0.88713187 , 0.5239736 , 0.49900988 , 0.05677444 ])
638- print (x_test_adv [0 , :])
639633 np .testing .assert_array_almost_equal (x_test_adv [0 , :], expected_x_test_adv , decimal = 6 )
640634 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
641635 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
@@ -706,7 +700,6 @@ def test_5_pytorch_iris(self):
706700 attack = ElasticNet (classifier , targeted = False , max_iter = 10 , verbose = False )
707701 x_test_adv = attack .generate (self .x_test_iris .astype (np .float32 ))
708702 expected_x_test_adv = np .asarray ([0.84810126 , 0.43320203 , 0.70404345 , 0.29160658 ])
709- print (x_test_adv [0 , :])
710703 np .testing .assert_array_almost_equal (x_test_adv [0 , :], expected_x_test_adv , decimal = 6 )
711704 self .assertLessEqual (np .amax (x_test_adv ), 1.0 )
712705 self .assertGreaterEqual (np .amin (x_test_adv ), 0.0 )
0 commit comments