You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by ERROR via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/11/18 06:25:27 UTC

[Apache TVM Discuss] [Questions] How can I get output name from graph runtime


I read the docs and have a question about how can we know what is the output we get from graph runtime.

For example, I have model A that have 3 outputs. 

The 3 outputs is

1) name: LayerA, shape: (1, 100)
2) name: LayerB, shape: (1, 100)
3) name: LayerC, shape: (1, 100, 200)

I see the this function [https://tvm.apache.org/docs/api/python/graph_runtime.html#tvm.contrib.graph_runtime.GraphModule.get_output](https://tvm.apache.org/docs/api/python/graph_runtime.html#tvm.contrib.graph_runtime.GraphModule.get_output). How can I know what is the index 0. Is it LayerA? The work around solution I think is the match the output shape and see what is the layer name. However, If I have the output that have the same shape, what should I do? Can I get some output name from module?

Thank you.





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-can-i-get-output-name-from-graph-runtime/8479/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/9321185fd539f8dd725b5b06c1a67f4148a1103dcec571ba0af6712f69954d39).

[Apache TVM Discuss] [Questions] How can I get output name from graph runtime

Posted by ERROR via Apache TVM Discuss <no...@discuss.tvm.ai>.

Thank you very much! I will check the PR that you send to me.





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-can-i-get-output-name-from-graph-runtime/8479/3) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/79781cf39bdb5634996997705e812be2760b9ff5abae96ca7c2ff7634be60fea).

[Apache TVM Discuss] [Questions] How can I get output name from graph runtime

Posted by Zhao Wu via Apache TVM Discuss <no...@discuss.tvm.ai>.

Good question. I think we can not get it directly currently. But the mechanism should have support it. For example, when you pass the output index, we could use `nodes_[outputs_[index].node_id].name` to get the name.

Something a bit more, I think the name you want more is the model's name, then you need the pr https://github.com/apache/incubator-tvm/pull/6885 for frontend keeping model node's name. Then previous code could get the correct output name for you.





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-can-i-get-output-name-from-graph-runtime/8479/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/7f2f9e0c091639dfb97f27c6c14a4159cbc8be447a06bb74fc068142a317c669).