Zha0q1 commented on a change in pull request #19737:
URL: https://github.com/apache/incubator-mxnet/pull/19737#discussion_r556139241
##########
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 just checked: it seems we can create > 10-d tensors, but I think many
ops do not support >= 10d tensors and in general there is no use case for
high-dimensional tensors
----------------------------------------------------------------
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]