I need to know what is the correct input dimension of Input images some discussion forum tell me its channelHeightWidth other telling me HeightWidthchannel
Which one do I need to chose while doing training of Model and for Visualization.
I need to know what is the correct input dimension of Input images some discussion forum tell me its channelHeightWidth other telling me HeightWidthchannel
Which one do I need to chose while doing training of Model and for Visualization.
PyTorch expects inputs as [batch_size, channels, height, width]
for the “usual” layers in CNNs.
If you want to visualize numpy arrays via e.g. matplotlib
, then you should remove the batch dimension and permute the array to a channels-last format.
However, this is matplotlib
specific and other visualization libraries might use other formats.