PyTorch uses channels-first by default and allows you to transform the input as well as model parameters to channels-last as described here 3, which could be beneficial for mixed-precision training using TensorCores.



 ArshadIram:

How can we visualize these images?


You can visualize the images using any library capable of it (e.g. PIL or matplotib).