@@ -97,7 +97,7 @@ def test_2_tensorflow_numpy(self):
9797 x_out = attack_ap .insert_transformed_patch (
9898 self .x_train_mnist [0 ], np .ones ((14 , 14 , 1 )), np .asarray ([[2 , 13 ], [2 , 18 ], [12 , 22 ], [8 , 13 ]])
9999 )
100- x_out_expexted = np .array (
100+ x_out_expected = np .array (
101101 [
102102 0.0 ,
103103 0.0 ,
@@ -130,7 +130,7 @@ def test_2_tensorflow_numpy(self):
130130 ],
131131 dtype = np .float32 ,
132132 )
133- np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expexted , decimal = 3 )
133+ np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expected , decimal = 3 )
134134
135135 if sess is not None :
136136 sess .close ()
@@ -166,7 +166,7 @@ def test_3_tensorflow_v2_framework(self):
166166 x_out = attack_ap .insert_transformed_patch (
167167 self .x_train_mnist [0 ], np .ones ((14 , 14 , 1 )), np .asarray ([[2 , 13 ], [2 , 18 ], [12 , 22 ], [8 , 13 ]])
168168 )
169- x_out_expexted = np .array (
169+ x_out_expected = np .array (
170170 [
171171 0.0 ,
172172 0.0 ,
@@ -199,7 +199,7 @@ def test_3_tensorflow_v2_framework(self):
199199 ],
200200 dtype = np .float32 ,
201201 )
202- np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expexted , decimal = 3 )
202+ np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expected , decimal = 3 )
203203
204204 mask = np .ones ((1 , 28 , 28 )).astype (bool )
205205 attack_ap .apply_patch (x = self .x_train_mnist , scale = 0.1 , mask = mask )
@@ -240,7 +240,7 @@ def test_6_keras(self):
240240 x_out = attack_ap .insert_transformed_patch (
241241 self .x_train_mnist [0 ], np .ones ((14 , 14 , 1 )), np .asarray ([[2 , 13 ], [2 , 18 ], [12 , 22 ], [8 , 13 ]])
242242 )
243- x_out_expexted = np .array (
243+ x_out_expected = np .array (
244244 [
245245 0.0 ,
246246 0.0 ,
@@ -273,7 +273,7 @@ def test_6_keras(self):
273273 ],
274274 dtype = np .float32 ,
275275 )
276- np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expexted , decimal = 3 )
276+ np .testing .assert_almost_equal (x_out [15 , :, 0 ], x_out_expected , decimal = 3 )
277277
278278 def test_4_pytorch (self ):
279279 """
0 commit comments