I was trying to train an SRGAN-model on my dataset of text images. Those are 100 160x30 .png files.
Here is the model: https://github.com/leftthomas/SRGAN/blob/master/model.py 5
https://github.com/leftthomas/SRGAN/blob/master/train.py 3
(I didn’t change anything apart from the path to my dataset)
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.
Thanks.