Zha0q1 commented on a change in pull request #19737:
URL: https://github.com/apache/incubator-mxnet/pull/19737#discussion_r556137376
##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -2784,6 +2784,48 @@ def convert_arange(node, **kwargs):
return nodes
+@mx_op.register("reverse")
+def convert_reverse(node, **kwargs):
+ """Map MXNet's reverse operator attributes to ONNX
+ """
+ from onnx.helper import make_node
+ name, input_nodes, attrs = get_inputs(node, kwargs)
+
+ axis = int(attrs.get('axis', 0))
+
+ # Transpose takes perm as a parameter, so we must 'pad' the input to a
known dim (10 here)
+ perm = [i for i in range(10)]
Review comment:
I think in mxnet 10-d is the largest you can get
----------------------------------------------------------------
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]