LeeJunHyun / Image_Segmentation

Pytorch implementation of U-Net, R2U-Net, Attention U-Net, and Attention R2U-Net.
2.68k stars 595 forks source link

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

Closed BillGreenHand closed 5 years ago

BillGreenHand commented 5 years ago

thanks for your share,i am trying to use your program to run my dataset,the train picture's size is 512,512,its channel is 3,but when i run this program ,it appear this error, i don't know how to solve it,you know?thanks! RuntimeError: Given groups=1, weight of size 64 3 3 3, expected input[1, 512, 512, 3] to have 3 channels, but got 512 channels instead

LeeJunHyun commented 5 years ago

Hi, @BillGreenHand . I think you should transpose your dataset to have [3,512,512]. Could you please try this?

BillGreenHand commented 5 years ago

Thanks a lot, I have solved this problem.

LeeJunHyun commented 5 years ago

Good for you! If you have further issue, then pleas let me know. I'm gonna close this issue. Thank you for your interest about my repo :)