@@ -46,26 +46,18 @@ def compare(x, x_ref, index_x=[], index_x_ref=[]):
46
46
np .testing .assert_allclose (x_cropped , np .zeros (x_cropped .shape ), 1e-2 , 0 )
47
47
else :
48
48
np .testing .assert_allclose (
49
- x_cropped -
50
- x_ref [
49
+ x_cropped
50
+ - x_ref [
51
51
:, :, index_x_ref [0 ] : index_x_ref [1 ], index_x_ref [3 ] : index_x_ref [4 ]
52
52
][:, :, :: index_x_ref [2 ], :: index_x_ref [5 ]],
53
53
np .zeros (x_cropped .shape ),
54
54
1e-2 ,
55
55
0 ,
56
56
)
57
- # np.testing.assert_allclose(
58
- # x_cropped,
59
- # x_ref[
60
- # :, :, index_x_ref[0] : index_x_ref[1], index_x_ref[3] : index_x_ref[4]
61
- # ][:, :, :: index_x_ref[2], :: index_x_ref[5]],
62
- # 1e-2,
63
- # 0,
64
- # )
65
57
66
58
67
59
@pytest .mark .parametrize (
68
- "padding_tested" , ["circular" , "constant" , "symmetric" , "reflect" ,"replicate" ]
60
+ "padding_tested" , ["circular" , "constant" , "symmetric" , "reflect" , "replicate" ]
69
61
)
70
62
@pytest .mark .parametrize (
71
63
"input_shape, batch_size, kernel_size, filters" ,
@@ -167,7 +159,8 @@ def test_padding(padding_tested, input_shape, batch_size, kernel_size, filters):
167
159
reason = "PadConv2d not available" ,
168
160
)
169
161
@pytest .mark .parametrize (
170
- "padding_tested" , ["circular" , "constant" , "symmetric" , "reflect" , "replicate" , "same" , "valid" ]
162
+ "padding_tested" ,
163
+ ["circular" , "constant" , "symmetric" , "reflect" , "replicate" , "same" , "valid" ],
171
164
)
172
165
@pytest .mark .parametrize (
173
166
"input_shape, batch_size, kernel_size, filters" ,
@@ -240,7 +233,8 @@ def test_predict(padding_tested, input_shape, batch_size, kernel_size, filters):
240
233
reason = "PadConv2d not available" ,
241
234
)
242
235
@pytest .mark .parametrize (
243
- "padding_tested" , ["circular" , "constant" , "symmetric" , "reflect" , "replicate" , "same" , "valid" ]
236
+ "padding_tested" ,
237
+ ["circular" , "constant" , "symmetric" , "reflect" , "replicate" , "same" , "valid" ],
244
238
)
245
239
@pytest .mark .parametrize (
246
240
"input_shape, batch_size, kernel_size, filters" ,
0 commit comments