Roshrini commented on a change in pull request #12633: Onnx version update from 
1.2.1 to 1.3 in CI
URL: https://github.com/apache/incubator-mxnet/pull/12633#discussion_r219989141
 
 

 ##########
 File path: python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
 ##########
 @@ -118,11 +118,23 @@ def add_n(attrs, inputs, proto_obj):
 # Sorting and Searching
 def argmax(attrs, inputs, proto_obj):
     """Returns indices of the maximum values along an axis"""
-    return 'argmax', attrs, inputs
+    new_attrs = translation_utils._fix_attribute_names(attrs, {'axis': 'axis',
+                                                               'keepdims': 
'keepdims'})
+    axis = new_attrs.get('axis', 0)
+    keepdims = new_attrs.get('keepdims', 0)
+    argmax_op = symbol.argmax(inputs[0], axis=axis, keepdims=keepdims)
+    cast_attrs = {'dtype': 'int64'}
+    return 'cast', cast_attrs, argmax_op
 
 def argmin(attrs, inputs, proto_obj):
     """Returns indices of the minimum values along an axis."""
-    return 'argmin', attrs, inputs
+    new_attrs = translation_utils._fix_attribute_names(attrs, {'axis': 'axis',
 
 Review comment:
   removed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to