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

Error loading state_dict for Pidinet #50

Open
mike-silver-Crafty-Apes-VFX opened this issue Apr 4, 2023 · 2 comments
Open

Error loading state_dict for Pidinet #50

mike-silver-Crafty-Apes-VFX opened this issue Apr 4, 2023 · 2 comments

Comments

@mike-silver-Crafty-Apes-VFX

Getting the following error when running the following command. Possibly the model and the weights are a mismatch?

python main.py --model pidinet_converted --config carv4 --sa --dil -j 4 --gpu 0 --savedir output --datadir input_images --dataset Custom --evaluate trained_models/table5_pidinet.pth --evaluate-converted

Traceback (most recent call last):
File "C:\Users\Mike\Desktop\Coding\pidinet\pidinet-master\pidinet-master\main.py", line 419, in
main(f)
File "C:\Users\Mike\Desktop\Coding\pidinet\pidinet-master\pidinet-master\main.py", line 202, in main
model.load_state_dict(convert_pidinet(checkpoint['state_dict'], args.config))
File "C:\Users\Mike\Anaconda3\envs\pidinet\Lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for PiDiNet:

@PrasannaKumar29
Copy link

Hi. Did u fix the issue? I'm facing the same

@TIAcode
Copy link

TIAcode commented Aug 5, 2024

I get this error if I leave --gpu 0 argument out, with GPU it works.

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

3 participants