pochih / FCN-pytorch

🚘 Easiest Fully Convolutional Networks
404 stars 143 forks source link

Mismatch error #2

Open Shaunlipy opened 6 years ago

Shaunlipy commented 6 years ago

Hi, I implement the code, but for the fcn.py on line 145. It says: "The size of tensor a (44) must match the size of tensor b (45) at non-singleton dimension 2"

I found the score shape is [1, 512, 44, 60] and the x4 shape is [1, 512, 45, 60]

Curious how would that happen?

Thanks

pochih commented 6 years ago

Can you report the dataset you used? Thanks!

Bing1002 commented 6 years ago

Hi,

I met the same question and I used camvid dataset. I don't know why is it? @brianhuang1019

andrecavalcante commented 6 years ago

For some reason, the attribute self.crop of the train dataset instance is reset to False when the validation dataset instance is created. Comment line #44 of init() method of Class CamVidDataset to solve this issue.

Water2style commented 5 years ago

For some reason, the attribute self.crop of the train dataset instance is reset to False when the validation dataset instance is created. Comment line #44 of init() method of Class CamVidDataset to solve this issue.

THANKS! after commenting ###self.crop = False,solve this issue. What bad influences will happen to our model?