cycleGAN-PyTorch icon indicating copy to clipboard operation
cycleGAN-PyTorch copied to clipboard

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

Open SurbhiKhushu opened this issue 5 years ago • 2 comments

Hello,

I am getting this error. I have implemented your code ,but written a custom dataset loader for my image patches.

Can you tell me how can I solve this error

SurbhiKhushu avatar May 31 '20 12:05 SurbhiKhushu

Hi, It seems like your number of input channels doesn't match with the convolution filter you defined. Try to match the input channels with the channels you defined in the convolution kernel. Also, the error you posted isn't sufficient to comment more.

Good luck

arnab39 avatar Jun 01 '20 15:06 arnab39

I was trying to implement your model on gray scale images. For gray scale I changed the input channel to 1. I suppose thats why it was throwing this error.

SurbhiKhushu avatar Jun 01 '20 19:06 SurbhiKhushu