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

question about the 'model.load_state_dict(checkpoint['state_dict'])', #17

Open
siyusa opened this issue Mar 11, 2019 · 4 comments
Open

Comments

@siyusa
Copy link

siyusa commented Mar 11, 2019

when I run the code,the result is like this :Missing key(s) in state_dict: "module.densenet121.features.denseblock1.denselayer1.......' I have been suffering with this problem for a week ,could you please help me ,I will appreciate very much.Looking forward to hearing from you

@YakinRubaiat
Copy link

I modified the heatmap code like this, it can process the state_dict correctly,
https://github.com/YakinRubaiat/chexnet/blob/ceb92ba7e43d646e9b51bcae77e647ba40ac8b59/HeatmapGenerator.py#L42

@AtulCIS
Copy link

AtulCIS commented Jan 2, 2020

Hi @YakinRubaiat , I am also getting the same error and I could not access the file HeatmapGenerator.py added by you

@yuyijie1995
Copy link

I met the same question , are you solved it?

@egenc
Copy link

egenc commented Jan 18, 2021

just change the line model.load_state_dict(modelCheckpoint['state_dict']) to model.load_state_dict(modelCheckpoint['state_dict'], False)

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

5 participants