chexnet code error ((RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: “module.densenet121.features.conv0.weight”))

I tried to execute the chexnet code of github but failed. (code github address:https://github.com/arnoweng/CheXNet) error message is as follows:
RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: “module.densenet121.features.conv0.weight”, …
I executed the code in the multiple gpu environment, and I added ‘CUDA_VISIBLE_DEVICES=0’ because I thought this was a problem, but the problem was not resolved. I want to know how to solve this problem.

2 Likes