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

KeyError: 'state_dict' #45

Open
marsna opened this issue May 15, 2020 · 3 comments
Open

KeyError: 'state_dict' #45

marsna opened this issue May 15, 2020 · 3 comments

Comments

@marsna
Copy link

marsna commented May 15, 2020

I run inference.py with pretrained model:
Traceback (most recent call last):
File "inference.py", line 78, in
main()
File "inference.py", line 32, in main
model.load_state_dict(checkpoint['state_dict'])
KeyError: 'state_dict'

@marsna
Copy link
Author

marsna commented May 15, 2020

@jfzhang95 I run inference.py with pretrained model:
Traceback (most recent call last):
File "inference.py", line 78, in
main()
File "inference.py", line 32, in main
model.load_state_dict(checkpoint['state_dict'])
KeyError: 'state_dict'
Help me,please!

@marsna
Copy link
Author

marsna commented May 15, 2020

@sdxass I run inference.py with pretrained model:
Traceback (most recent call last):
File "inference.py", line 78, in
main()
File "inference.py", line 32, in main
model.load_state_dict(checkpoint['state_dict'])
KeyError: 'state_dict'
Help me,please!

@Sandeep418
Copy link

@jfzhang95 I run inference.py with pretrained model:
Traceback (most recent call last):
File "inference.py", line 78, in
main()
File "inference.py", line 32, in main
model.load_state_dict(checkpoint['state_dict'])
KeyError: 'state_dict'
Help me,please!

The weight file shared by @jfzhang95 is trained on Sports-1M dataset,(It have 487 classes)its not on UCF-101,if you want to test inference code. give the sports 1m dataset labels file instead of ucf-101 labels file.
https://github.com/gtoderici/sports-1m-dataset/blob/master/labels.txt

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