Solved by ptrblck in post #2 
              
              
                matplotlib,pyplot.imshow expects a numpy array in a valid image shape (e.g. [height, width, channels] or [height, width]), while you are passing tensors in the shape [batch_size, channels, height, width] to it. 
You would thus have to index each image (via image = images[0]) and permute the axes to …