How to Avoid Transpose Node When use relay.frontend.from_tensorflow()

Hi:

When I test the inference speed of Resnet-50 optimized by TVM, I find that the Resnet-50 from relay.testing.resnet is faster than the Resnet-50 from relay.frontend.from_tensorflow.

It seems that relay.frontend.from_tensorflow add a lot of transpose nodes because of the NCHW layout. So, any suggestions to solve this problem? Adjusting the tensorflow fronzen graph or adjusting the relay.frontend.from_tensorflow parameters?

Thanks a lot.

1 Like

This WIP is targeting exactly this issue: Layout conversion pass

Thanks. Looking forward to it.