SCDA icon indicating copy to clipboard operation
SCDA copied to clipboard

RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 1, 1280, 1280] to have 3 channels, but got 1 channels instead

Open fosterr opened this issue 5 years ago • 2 comments

Hi there,

I'm trying to use my own dataset with this code. I've encountered the following error message and tried to fixed it, but after a couple of attempts I gave up.

It would be great if somebody can give me a hint.

The error message:

RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 1, 1280, 1280] to have 3 channels, but got 1 channels instead

Maybe some useful information:

The pictures I've used were originally in JPEG Format and were converted with mogrify to PNG8.

Code is run in docker container with the following image: docker.io/pytorch/pytorch:0.4.1-cuda9-cudnn7-devel

Tested on two independent host systems, RTX2070 Super and GTX 1060. Same error on both machines.

Thank you in advance.

fosterr avatar Jan 31 '21 12:01 fosterr

I also have to mention that I didn't use SLURM

fosterr avatar Jan 31 '21 12:01 fosterr

It seems a mismatch of input shape. Can you show your detailed input information?

xinge008 avatar Feb 23 '21 12:02 xinge008