I assume you are trying to tell me to permute the dimensions of the images and the label images right, because they need to be given to the network as [b, c, h, w] and I’m giving in a [b, h, w, c] format. I tried to do inputs.permute(0, 3, 1, 2) and labels…permute(0, 3, 1, 2) However I get RuntimeError: number of dims don't match in permute Also I think the tensor permute documentation needs to be more informative.