anirudhacharya commented on a change in pull request #12924: Fix ONNX export of 
keepdims param
URL: https://github.com/apache/incubator-mxnet/pull/12924#discussion_r227977296
 
 

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
 ##########
 @@ -1249,7 +1249,7 @@ def convert_argmax(node, **kwargs):
     attrs = node["attrs"]
 
     axis = int(attrs.get("axis"))
-    keepdims = int(attrs.get("keepdims")) if "keepdims" in attrs  else 1
+    keepdims = get_boolean_attribute_value(attrs, "keepdims") if "keepdims" in 
attrs else 1
 
 Review comment:
   this can be just `get_boolean_attribute_value(attrs, "keepdims")` 
   
   and `if "keepdims" in attrs else 1` can be removed, because the 
"get_boolean_attribute_value" method handles non-existing keys.

----------------------------------------------------------------
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