Open bluesky314 opened 6 years ago
In PyTorch, it is ok to load the pretrained weights as long as the layer names are the same even though their original layer types are different. For example, the networks in pd_resnet can load the pretrained weights of the corresponding networks in original models.resnet*. You can change your code: resnet = models.resnet18(pretrained=True) to: resnet = models.resnet18(pretrained=True)
And also change: model_urls = { 'pdresnet18': '', to be the original models_urls.resnet18.
Since only two of your layers are PartialConv2d, it should not be slow.
Hi, when I tried to load pretrained model of pdresnet50, it couldn't load because layer names of pretrained model did not match. there is "module." in front of layer names. I chaged them to "" on the RAM, then it loaded.
You mentioned in the previous issue we can load pretrained and convert conv2d to partialconv. How would you change it as the model structure is fixed in pretrained models? My model is
Using this makes your model train much slower than normal conv2d layers with fine tunning both off and on. How can i change all layers to PartialConv2d in the model above?
Also is there any plans to release a PartialConv3d? I would be interested in medical segmentation for that?
Thanks, Rahul