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/07/13 18:15:09 UTC

[GitHub] sandeep-krishnamurthy commented on a change in pull request #11593: onnx split op import

sandeep-krishnamurthy commented on a change in pull request #11593: onnx split op import
URL: https://github.com/apache/incubator-mxnet/pull/11593#discussion_r202432065
 
 

 ##########
 File path: python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
 ##########
 @@ -407,8 +407,22 @@ 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'))
 
 Review comment:
   Can this be empty?

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