Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
ONNX export: Shape operator
Browse files Browse the repository at this point in the history
  • Loading branch information
vandanavk committed Nov 19, 2018
1 parent 940b6ec commit acf64f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1562,3 +1562,10 @@ def convert_sum(node, **kwargs):
name=name
)
return [node]

@mx_op.register("shape_array")
def convert_shape(node, **kwargs):
"""Map MXNet's shape_array operator attributes to onnx's Shape operator
and return the created node.
"""
return create_basic_op_node('Shape', node, kwargs)
3 changes: 2 additions & 1 deletion tests/python-pytest/onnx/export/onnx_backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
'test_clip'
'test_cast',
'test_depthtospace',
'test_instancenorm'
'test_instancenorm',
'test_shape'
]

BASIC_MODEL_TESTS = [
Expand Down

0 comments on commit acf64f2

Please sign in to comment.