zenyuhao commented on issue #12672:
URL: https://github.com/apache/tvm/issues/12672#issuecomment-1240326084
thanks for reply
In tensorflow graph, output of graph node is naming by
`op_name:output_index`, so at least there alwasy be 0 after outout.
im not sure that the same design in onnx, and i think the stable way to get
output by output index is offical in tvm doc,
even though get_output_by_name is not stable in some situation, here is
simple fix which works well
```cpp
for (size_t i = 0; i < outputs_.size(); i++) {
const uint32_t nid = outputs_[i].node_id;
std::string& name = nodes_[nid].name;
std::stringstream ss;
ss << name << ":" << i;
output_map_[ss.str()] = i;
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]