marcoabreu commented on a change in pull request #11593: onnx split op import
URL: https://github.com/apache/incubator-mxnet/pull/11593#discussion_r200783670
##########
File path: python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
##########
@@ -407,8 +407,19 @@ def cast(attrs, inputs, proto_obj):
def split(attrs, inputs, proto_obj):
"""Splits an array along a particular axis into multiple sub-arrays."""
+ split_list = attrs.get('split') if 'split' in attrs else []
new_attrs = translation_utils._fix_attribute_names(attrs,
{'split' :
'num_outputs'})
+ if 'axis' not in attrs:
+ new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'axis': 0})
+
+ if not split_list:
+ num_outputs = len(proto_obj.model_metadata.get('output_tensor_data'))
+ else:
+ raise NotImplementedError("Operator {} in MXNet does not support
variable splits.".format('split'))
Review comment:
Could we add a feature request issue for this so we keep track of it?
----------------------------------------------------------------
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