How to Covert MXNet NCHW layout to NHWC in relay ir

Hi, @tqchen,@anijain2305 , @srkreddy1238 is there any way to Covert MXNet or ONNX fronted NCHW layout to NHWC in relay ir?

My Demand: I have a trained mxnet model with the layout of nchw, but my target only support nhwc, wo i want transpose the model layout from nchw to nhwc in relay. so that i can get a relay ir graph with nhwc.

Hi, you can try the ConvertLayout pass https://tvm.apache.org/docs/dev/convert_layout.html#usage