Here the encoded_labels size is torch.Size([128, 10, 28, 28])
Now I want to concatenate it with images cat_real_labels = torch.cat((realImages.float(), encoded_labels .float()),1)
output: torch.Size([128, 11, 28, 28])
You cannot visualize it directly, as the tensor doesn’t have a valid image shape.
However, you could visualize the 11 channels separately of all 128 samples (so 1408 grayscale images).
Something like this approach would work. The difference would be that you would have to flatten the first two dimensions in case you want to visualize all 11*128 grayscale images.