@@ -834,6 +834,22 @@ def test_topk(self):
834
834
actual , expected = self ._run (output , {x : x_val }, {_INPUT : x_val })
835
835
self .assertAllClose (expected , actual )
836
836
837
+ def test_stack_axis0 (self ):
838
+ x_val = [np .random .randn (3 , 4 ).astype ("float32" ) for _ in range (10 )]
839
+ x = [tf .constant (x_val [i ], dtype = tf .float32 ) for i in range (10 )]
840
+ x_ = tf .stack (x , axis = 0 )
841
+ output = tf .identity (x_ , name = _TFOUTPUT )
842
+ actual , expected = self ._run (output , {}, {})
843
+ self .assertAllClose (expected , actual )
844
+
845
+ def test_stack_axis1 (self ):
846
+ x_val = [np .random .randn (3 , 4 ).astype ("float32" ) for _ in range (10 )]
847
+ x = [tf .constant (x_val [i ], dtype = tf .float32 ) for i in range (10 )]
848
+ x_ = tf .stack (x , axis = 1 )
849
+ output = tf .identity (x_ , name = _TFOUTPUT )
850
+ actual , expected = self ._run (output , {}, {})
851
+ self .assertAllClose (expected , actual )
852
+
837
853
@unittest .skipIf (BACKEND in ["caffe2" , "onnxmsrt" ], "Space2Depth not implemented, works on onnxmsrtnext" )
838
854
def test_space_to_depth (self ):
839
855
x_val = make_xval ([1 , 2 , 2 , 1 ])
@@ -873,7 +889,6 @@ def test_strided_slice2(self):
873
889
874
890
@unittest .skipIf (BACKEND in ["caffe2" , "onnxmsrt" ], "not correctly supported" )
875
891
def test_resize_nearest_neighbor (self ):
876
- # this should work but no runtime I tried supports it.
877
892
x_shape = [1 , 15 , 20 , 2 ]
878
893
x_new_size = [30 , 40 ]
879
894
x_val = np .arange (1 , 1 + np .prod (x_shape )).astype ("float32" ).reshape (x_shape )
@@ -886,7 +901,6 @@ def test_resize_nearest_neighbor(self):
886
901
887
902
@unittest .skipIf (BACKEND in ["caffe2" , "onnxmsrt" ], "not correctly supported" )
888
903
def test_resize_bilinear (self ):
889
- # this should work but no runtime I tried supports it.
890
904
x_shape = [1 , 15 , 20 , 2 ]
891
905
x_new_size = [30 , 40 ]
892
906
x_val = np .arange (1 , 1 + np .prod (x_shape )).astype ("float32" ).reshape (x_shape )
0 commit comments