You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/03/01 22:26:30 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #19952: [v1.x] Add onnx export support for one_hot and random_uniform_like and unit tests for one_hot.

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



##########
File path: tests/python-pytest/onnx/test_operators.py
##########
@@ -1183,6 +1183,15 @@ def test_onnx_export_take_raise(tmp_path, dtype, axis):
     op_export_test('take', M, [x, y], tmp_path)
 
 
+# onnxruntime currently only supports float32 and int64
+@pytest.mark.parametrize("dtype", ["float32", "int64"])
+@pytest.mark.parametrize("depth", [1, 3, 5, 10])
+def test_onnx_export_one_hot(tmp_path, dtype, depth):
+    M = def_model('one_hot', depth=depth, dtype=dtype)
+    x = mx.random.randint(0, 10, (depth * depth)).astype('int64')

Review comment:
       i see thanks!




----------------------------------------------------------------
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:
users@infra.apache.org