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/09/25 18:22:48 UTC

[GitHub] anirudhacharya commented on a change in pull request #12634: Add optional output label in ONNX export

anirudhacharya commented on a change in pull request #12634: Add optional output label in ONNX export
URL: https://github.com/apache/incubator-mxnet/pull/12634#discussion_r220302899
 
 

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/export_onnx.py
 ##########
 @@ -222,7 +224,10 @@ def create_onnx_graph_proto(self, sym, params, in_shape, in_type, verbose=False)
         # name is "Softmax", this node will have a name "Softmax_label". Also, the new node
         # will always be second last node in the json graph.
         # Deriving the output_label name.
-        output_label = sym.get_internals()[len(sym.get_internals()) - 1].name + "_label"
+        if not out_label:
+            output_label = sym.get_internals()[len(sym.get_internals()) - 1].name + "_label"
+        else:
 
 Review comment:
   you can remove the else statement here and use one variable `out_label` instead of `output_label`

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