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/06/12 16:54:22 UTC
[GitHub] sandeep-krishnamurthy commented on a change in pull request #11140:
[MXNET-344] [ONNX-MXNet] Add new Operator Translations for ONNX import module
sandeep-krishnamurthy commented on a change in pull request #11140: [MXNET-344] [ONNX-MXNet] Add new Operator Translations for ONNX import module
URL: https://github.com/apache/incubator-mxnet/pull/11140#discussion_r194813510
##########
File path: python/mxnet/contrib/onnx/_import/op_translations.py
##########
@@ -454,20 +505,49 @@ def reduce_mean(attrs, inputs, proto_obj):
return 'mean', new_attrs, inputs
def reduce_min(attrs, inputs, proto_obj):
- """Reduce the array along a given axis by mean value"""
+ """Reduce the array along a given axis by minimum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'min', new_attrs, inputs
def reduce_sum(attrs, inputs, proto_obj):
- """Reduce the array along a given axis by mean value"""
+ """Reduce the array along a given axis by sum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'sum', new_attrs, inputs
def reduce_prod(attrs, inputs, proto_obj):
- """Reduce the array along a given axis by mean value"""
+ """Reduce the array along a given axis by product value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'prod', new_attrs, inputs
+def reduce_log_sum(attrs, inputs, proto_obj):
+ """Reduce the array along a given axis by log sum value"""
+ keep_dims = True if 'keepdims' not in attrs else attrs.get('keepdims')
+ sum_op = symbol.sum(inputs[0], axis=attrs.get('axes'),
Review comment:
Why inputs[0]?
----------------------------------------------------------------
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