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 jmatai via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/03/02 20:11:43 UTC

[Apache TVM Discuss] [Questions] How to extract Relay expressions following If statement


Hi @mbrookhart,

I have made some attempts as you suggested (doing reverse topological order and getting the part after IF as you suggested). Here is my understanding of your suggestions which I also agree with. Please let me know if I got them wrong. Here are the steps that I assumed that I should follow to extract the parts after IF:

1) To reverse traversal by reverse top sort
2) when I hit IF, I know that I traversed the parts that I need to extract. 

I was not able to traverse the relay expressions in reverse order. Could you please elaborate on this? 

I have tried to use **ExprMutator** and  **relay.analysis.post_order_visit** to do reverse topological order sort.


[quote="mbrookhart, post:10, topic:9144"]
I’m not sure I understand the use, though. There might be a better solution if you can share what you’re trying to do at a slightly higher level?
[/quote]





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-extract-relay-expressions-following-if-statement/9144/13) 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/c7c80f5cd29d24a8f355deb50c5862801348c73c0a62164bf9b05a4bcbc0bee1).