vandanavk commented on a change in pull request #12924: Fix wrong type for ONNX
export of mean keepdims
URL: https://github.com/apache/incubator-mxnet/pull/12924#discussion_r227876264
##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -1431,11 +1431,12 @@ def convert_mean(node, **kwargs):
name = node["name"]
proc_nodes = kwargs["proc_nodes"]
inputs = node["inputs"]
+ attrs = node["attrs"]
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(attrs, "keepdims")
Review comment:
Could you fix this in other places too? convert_max, convert_min etc might
have the same problem. Maybe argmin, argmax too.
----------------------------------------------------------------
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