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 2020/04/05 12:11:28 UTC

[GitHub] [incubator-mxnet] QueensGambit commented on issue #17621: get_inputs function in ONNX _op_translations.py does not support Nodes with multiple outputs

QueensGambit commented on issue #17621: get_inputs function in ONNX _op_translations.py does not support Nodes with multiple outputs
URL: https://github.com/apache/incubator-mxnet/issues/17621#issuecomment-609406400
 
 
   Hi @ThomasGmeinder ,
   I also created a PR wit a unit-test about this:
   https://github.com/apache/incubator-mxnet/pull/17827
   
   Probably, your solution should be prefered:
   ```python
           if isinstance(proc_node, NodeProto):
              # Nodes can have multiple outputs. Index the output with ip[1]
              input_nodes.append(proc_node.output[ip[1]])
           else:
              input_nodes.append(proc_node.name)
   ```
   
   over the try-catch block:
   ```python
           try:
               # ip[1] defines which output index to use
               input_nodes.append(proc_nodes[input_node_id].output[ip[1]])
           except AttributeError:
               # fallback to the name attribute as output if the output attribute does not exist (e.g. for data nodes)
               input_nodes.append(proc_nodes[input_node_id].name)
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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