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 2018/09/25 22:59:30 UTC

[GitHub] sandeep-krishnamurthy commented on a change in pull request #12633: Onnx version update from 1.2.1 to 1.3 in CI

sandeep-krishnamurthy 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_r220381421
 
 

 ##########
 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'}
 
 Review comment:
   Please add it as code comment for easy maintenance.

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


With regards,
Apache Git Services