Zha0q1 commented on a change in pull request #19689:
URL: https://github.com/apache/incubator-mxnet/pull/19689#discussion_r544826175



##########
File path: tests/python-pytest/onnx/test_operators.py
##########
@@ -171,3 +171,45 @@ def test_onnx_export_fully_connected(tmp_path, dtype, 
num_hidden, no_bias, flatt
     op_export_test('FullyConnected', M, args, tmp_path)
 
 
[email protected]('dtype', ['float32', 'float64', 'int32', 'int64'])
[email protected]('axes', [None, [1,0,2]])
+def test_onnx_export_transpose(tmp_path, dtype, axes):
+    if axes != None:
+        M = def_model('transpose', axes=axes)
+    else:
+        M = def_model('transpose')
+    x = mx.nd.array([[[1,2],[3,4]],[[5,6],[7,8]]], dtype=dtype)
+    op_export_test('transpose', M, [x], tmp_path)
+
+
[email protected]('dtype', ['float32', 'float64'])
[email protected]('axis', [0, 1, 2])
+def test_onnx_export_expand_dims(tmp_path, dtype, axis):
+    M = def_model('expand_dims', axis=axis)
+    x = mx.nd.random.uniform(0, 1, (2,3,4), dtype=dtype)
+    op_export_test('expand_dims', M, [x], tmp_path)
+
+
[email protected]('dtype', ['float32', 'float64', 'int32', 'int64'])
+def test_onnx_export_broadcast_add(tmp_path, dtype):
+    M = def_model('broadcast_add')
+    x = mx.nd.array([[1,1,1],[1,1,1]], dtype=dtype)
+    y = mx.nd.array([[0],[1]], dtype=dtype)
+    op_export_test('broadcast_add', M, [x, y], tmp_path)
+
+
[email protected]('dtype', ['float32', 'float64', 'int32', 'int64'])
[email protected]('axis', [0, 1, -1])
+def test_onnx_export_stack(tmp_path, dtype, axis):
+    M = def_model('stack', axis=axis)

Review comment:
       shall we also try higher dimensional inputs?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to