-
Notifications
You must be signed in to change notification settings - Fork 42
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
About loading pre-training errors #1
Comments
@linyi785 Could you describe the detailed errors? import torch
from oct_resnet import oct_resnet50
net = oct_resnet50()
net.load_state_dict(torch.load('/path/to/oct_resnet50_cosine.pth')) |
RuntimeError: Error(s) in loading state_dict for OctResNet: |
The pre-training weight I used is that the standard resnet50 is not oct_resnet50. Is it wrong here? |
The architecture of vanilla ResNet and OctResNet is different in almost all layers, so directly loading the weight of ResNet to OctResNet causes the error you met. |
thanks!By the way,Is your pre-training weight trained on the ImageNet dataset? |
yes |
Thank you very much for solving all my doubts. |
First of all, thank you for your code, which has benefited me a lot, but the same error always occurs when loading the pre-training model. The error code is as follows
Error(s) in loading state_dict for OctResNet:Missing key(s) in state_dict:
Can you help me with it, or can you provide me with a full version of the code? I am grateful! My email is bruceleely@outlook.com
The text was updated successfully, but these errors were encountered: