Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading pre-trained resnet50 #9

Open
thom966 opened this issue Apr 24, 2023 · 1 comment
Open

Loading pre-trained resnet50 #9

thom966 opened this issue Apr 24, 2023 · 1 comment

Comments

@thom966
Copy link

thom966 commented Apr 24, 2023

I have a question regarding loading a ResNet model other than ResNet-34. I tried to use ResNet-50 with the pre-trained weights provided by PyTorch, but the ResNet-50 model generated from class ResNetBackbone(Backbone) is different from the pre-trained model from PyTorch.

Loaded pre-trained model from pytorch:
image

From class ResNetBackbone(Backbone):
image

Could you please tell me how to properly load the pre-trained ResNet-50?
Thank you so much.

@danielS91
Copy link
Member

Pretrained weights from PyTorch are loaded automatically for ResNet50 unless you pass the '--no-pretrained-backbone' argument to main.py (see HERE).

Loading is done HERE. However, note that the weights are from torchvision v0.4.2 (see HERE), keys in newer versions may be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants