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/10/25 08:26:55 UTC

[GitHub] MoritzMaxeiner commented on a change in pull request #12924: Fix ONNX export of keepdims param

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


With regards,
Apache Git Services