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

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
 ##########
 @@ -1353,7 +1353,7 @@ def convert_min(node, **kwargs):
     mx_axis = node.get("attrs", {}).get("axis", None)
     axes = convert_string_to_list(str(mx_axis)) if mx_axis is not None else 
None
 
-    keepdims = int(node.get("attrs", {}).get("keepdims", 0))
+    keepdims = get_boolean_attribute_value(node.get("attrs", {}), "keepdims")
 
 Review comment:
   @anirudhacharya  Are you sure the existence of `attrs` is guaranteed for 
these operators? I explicitly reused the `node.get("attrs", {})` since the rest 
of these functions (in contrast to some of the others) do not assume the 
existance of `attrs`.

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