Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

I can't run code. Can anyone help me #47

Copy link
Copy link

Description

@BrQKarkac
Issue body actions

When I download and run the code I get the following error. I get the same error when I try to run it on COLAB. I didn't understand the problem and I couldn't solve it

C:\Users\BrQ\AppData\Local\Programs\Python\Python39\python.exe C:\Users\BrQ\Desktop\COLAB\CheXNet-master\model.py
C:\Users\BrQ\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
C:\Users\BrQ\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=DenseNet121_Weights.IMAGENET1K_V1. You can also use weights=DenseNet121_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)
=> loading checkpoint
Traceback (most recent call last):
File "C:\Users\BrQ\Desktop\COLAB\CheXNet-master\model.py", line 129, in
main()
File "C:\Users\BrQ\Desktop\COLAB\CheXNet-master\model.py", line 40, in main
model.load_state_dict(checkpoint['state_dict'])
File "C:\Users\BrQ\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 2189, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.densenet121.features.denseblock1.denselayer1.norm1.weight", "module.densenet121.features.denseblock1.denselayer1.norm1.bias", "module.densenet121.features.denseblock1.denselayer1.norm1.running_mean", "module.densenet121.features.denseblock1.denselayer1.norm1.running_var",
....
"module.densenet121.features.denseblock1.denselayer1.conv1.weight", "module.densenet121.features.denseblock1.denselayer1.norm2.weight", "module.densenet121.features.denseblock1.denselayer1.norm2.bias", "module.densenet121.features.denseblock1.denselayer1.norm2.running_mean", "module.densenet121.features.denseblock1.denselayer1.norm2.running_var", "module.densenet121.features.denseblock1.denselayer1.conv2.weight", "module.densenet121.features.denseblock1.denselayer2.norm1.weight", "module.densenet121.features.denseblock1.denselayer2.norm1.bias", "module.densenet121.features.denseblock1.denselayer2.norm1.running_mean", "module.densenet121.features.denseblock4.denselayer16.norm.2.running_mean", "module.densenet121.features.denseblock4.denselayer16.norm.2.running_var", "module.densenet121.features.denseblock4.denselayer16.conv.2.weight".

Process finished with exit code 1

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.