I set the crop_size to 24, the upscale to 2 and start the training, but then the following error occurs:
RuntimeError: Given groups=1, weight of size [64, 3, 9, 9], expected input[64, 4, 12, 12] to have 3 channels, but got 4 channels instead
I am sure that all of my images have 3 channels, which is confirmed by img.shape.
Nevertheless, I am stuck and,honestly, I have no idea where exactly this fourth channel might be.
Can you please help me figure out what is wrong. I have googled similar discussions, but the most frequent piece of advice there is to make sure the input is not rgba, which in my case is not applicable.
I had the same issue after loading all graphs direct from seaborn. I follow the face landmarks tutorial and your tips on how to load the data into the data loader. I successfully load the data, saw the images ( so they were there), but then to my surprise
seems that you are following the tutorial that uses skimage.io to read the image which returns a numpy array, or some other object. You will either need to transform the image to PIL or, replace skimageimread with PIL image open, something like:
from PIL import Image
image = Image.open(img_name)
It turns out the issue is on the transforms normalise, i was using 3 channels for a 1 channel data. I now manage to easily load, shuffle and reload the data using imageFolder ( Thanks to Patrick ) and some other techniques I picked here in the forum.