Converting a whole model from NHWC to NWHW in Relay

I successfully loaded a TF Lite model in Relay thanks to the TF Lite frontend. As the the TF Lite Relay frontend now generates an NHWC graph, I run into issues when trying to compile the model for OpenCL/Vulkan since they require NCHW.

What’s the easiest way to convert the relay graph to use NCHW?

1 Like

Layout conversion pass Some ongoing work. We might want a layout conversion pass for this use case.

1 Like