usuyama/pytorch-unet

Resnet Model Validity

ozen opened this issue · 1 comments

ozen commented

Hi,

I can't get your pytorch_resnet18_unet.ipynb working.

In layer4 = self.layer4_1x1(layer4) line, it throws the following error:

RuntimeError: Given groups=1, weight of size [1024, 2048, 1, 1], expected input[2, 512, 7, 7] to have 2048 channels, but got 512 channels instead

I haven't modified any of your code.

Thanks for reporting. I was testing the model with resnet50 and forgot to go back to resnet18. Updated the notebook https://github.com/usuyama/pytorch-unet/blob/master/pytorch_resnet18_unet.ipynb