How to convert NCHW to NHWC in tvm?

I believe you can use topi.transpose. This allows you to rearrange the axes of an input tensor.

Something along the lines of:

t_nhwc = topi.transpose(t_nchw, axis=(0, 2, 3, 1))

Where (0, 1, 2, 3) == (n, c, h, w), rearranging to the desired (n, h, w, c) == (0, 2, 3, 1).