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

State_dict missing keys problem #7

Open
fdy61 opened this issue Oct 27, 2023 · 2 comments
Open

State_dict missing keys problem #7

fdy61 opened this issue Oct 27, 2023 · 2 comments

Comments

@fdy61
Copy link

fdy61 commented Oct 27, 2023

I use the vgg16convs.mat the link provided to train 10 rounds.And I use the epoch10.pth to test,it will report an error ,saying missing keys,But I had checked that no keys had been missed.
6b3382b68457dd729a5b55256ef31a0

@yun-liu
Copy link
Owner

yun-liu commented Oct 28, 2023

checkpoint = torch.load('/path/to/your/checkpoint')
model.load_state_dict(checkpoint['state_dict'])

@fdy61
Copy link
Author

fdy61 commented Oct 28, 2023

It worked.Thank you so much.

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