ptrblck:

permute = [2, 1, 0] x = x[permute, :, :] y = x.numpy() a = y.flatten() a = a.reshape(224, 224, 3) plt.imshow(a)


Before storing the image i just did a permute like you did to switch color channels from RGB to BGR, and than i saved it with torch.save().
It seems like performing the permute to get the image in BGR creates problems with the next numpy reshape.
As you show me, made the image back to RGB with an another permute solve the problem but i can’t understand why i can’t visualize the image in BGR