41
41
_OUTPUT1 = "output1:0"
42
42
43
43
44
- # pylint: disable=C0111
45
-
46
-
47
44
def make_xval (shape ):
48
45
x_val = np .arange (np .prod (shape )).astype ("float32" ).reshape (shape )
49
46
return x_val
@@ -54,7 +51,7 @@ def get_conv_getdata(kind=1):
54
51
# generate all combinations (costly)
55
52
dims = [
56
53
("padding" , ["SAME" , "VALID" ]),
57
- ("input_sizes" , [[32 , 35 , 35 , 288 ], [32 , 17 , 17 , 1248 ], [1 , 28 , 28 , 3 ], [32 , 8 , 8 , 2048 ]]),
54
+ ("input_sizes" , [[32 , 35 , 35 , 3 ], [32 , 17 , 17 , 3 ], [1 , 28 , 28 , 3 ], [32 , 8 , 8 , 3 ]]),
58
55
("filter_sizes" , [[1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ], [1 , 5 , 5 , 1 ], [1 , 1 , 1 , 1 ], [1 , 5 , 2 , 1 ], [1 , 2 , 5 , 1 ]]),
59
56
("strides" , [[1 , 2 , 2 , 1 ], [1 , 1 , 1 , 1 ]]),
60
57
]
@@ -65,23 +62,23 @@ def get_conv_getdata(kind=1):
65
62
elif kind == 1 :
66
63
# some combination to that give decent padding coverage
67
64
data = [
68
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ]),
69
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 2 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
70
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 1 , 1 , 1 ], [1 , 1 , 1 , 1 ]),
71
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 5 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
72
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 2 , 5 , 1 ], [1 , 2 , 2 , 1 ]),
73
- ('SAME' , [32 , 35 , 35 , 288 ], [1 , 2 , 5 , 1 ], [1 , 1 , 1 , 1 ]),
65
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ]),
66
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 2 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
67
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 1 , 1 , 1 ], [1 , 1 , 1 , 1 ]),
68
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 5 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
69
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 2 , 5 , 1 ], [1 , 2 , 2 , 1 ]),
70
+ ('SAME' , [32 , 35 , 35 , 3 ], [1 , 2 , 5 , 1 ], [1 , 1 , 1 , 1 ]),
74
71
('SAME' , [1 , 28 , 28 , 3 ], [1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ]),
75
72
('SAME' , [1 , 28 , 28 , 3 ], [1 , 3 , 3 , 1 ], [1 , 1 , 1 , 1 ]),
76
73
('SAME' , [1 , 28 , 28 , 3 ], [1 , 2 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
77
74
('SAME' , [1 , 28 , 28 , 3 ], [1 , 2 , 2 , 1 ], [1 , 1 , 1 , 1 ]),
78
75
('SAME' , [1 , 28 , 28 , 3 ], [1 , 5 , 5 , 1 ], [1 , 2 , 2 , 1 ]),
79
76
('SAME' , [1 , 28 , 28 , 3 ], [1 , 5 , 5 , 1 ], [1 , 1 , 1 , 1 ]),
80
77
('SAME' , [1 , 28 , 28 , 3 ], [1 , 5 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
81
- ('SAME' , [32 , 8 , 8 , 2048 ], [1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ]),
82
- ('SAME' , [32 , 8 , 8 , 2048 ], [1 , 3 , 3 , 1 ], [1 , 1 , 1 , 1 ]),
83
- ('VALID' , [32 , 35 , 35 , 288 ], [1 , 3 , 3 , 1 ], [1 , 1 , 1 , 1 ]),
84
- ('VALID' , [32 , 35 , 35 , 288 ], [1 , 2 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
78
+ ('SAME' , [32 , 8 , 8 , 3 ], [1 , 3 , 3 , 1 ], [1 , 2 , 2 , 1 ]),
79
+ ('SAME' , [32 , 8 , 8 , 3 ], [1 , 3 , 3 , 1 ], [1 , 1 , 1 , 1 ]),
80
+ ('VALID' , [32 , 35 , 35 , 3 ], [1 , 3 , 3 , 1 ], [1 , 1 , 1 , 1 ]),
81
+ ('VALID' , [32 , 35 , 35 , 3 ], [1 , 2 , 2 , 1 ], [1 , 2 , 2 , 1 ]),
85
82
]
86
83
for idx , v in enumerate (data ):
87
84
yield (idx ,) + v
@@ -191,8 +188,6 @@ def test_maxpool(self):
191
188
self .logger .debug (str (p ))
192
189
self ._run_test_case ([_OUTPUT ], {_INPUT : x_val })
193
190
194
- @unittest .skipIf (get_test_config ().is_onnxruntime_backend and get_test_config ().backend_version == "0.2.1" ,
195
- "onnxruntime bug" )
196
191
@check_onnxruntime_incompatibility ("AveragePool" )
197
192
def test_avgpool (self ):
198
193
for tf_shape in ["known" , "unknown" ]:
@@ -1195,7 +1190,7 @@ def test_randomuniform(self):
1195
1190
# since results are random, compare the shapes only
1196
1191
self ._run_test_case ([_OUTPUT ], {}, check_value = False , check_shape = True )
1197
1192
1198
- @unittest .skip ("" )
1193
+ @unittest .skip ("TF RandomUniformInt is not supported " )
1199
1194
def test_randomuniform_int (self ):
1200
1195
shape = tf .constant ([2 , 3 ], name = "shape" )
1201
1196
x_ = tf .random_uniform (shape , name = "rand" , dtype = tf .int32 , maxval = 10 )
0 commit comments