Relay expr to te based computation?

Hi, is it possible to convert Relay exprs to te-based computation? Or vice versa?

If not, how can I apply optimizations offered by Relay to te-based network?