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

I can't download pretrained model #44

Open
anzheng13 opened this issue May 7, 2020 · 9 comments
Open

I can't download pretrained model #44

anzheng13 opened this issue May 7, 2020 · 9 comments

Comments

@anzheng13
Copy link

No description provided.

@anzheng13
Copy link
Author

I download this in windows

@WENDGOUNDI
Copy link

@anzheng13
Copy link
Author

Thank you.

@marsna
Copy link

marsna commented May 15, 2020

Can you run inference.py with pretrained model?
I run inference.py and see error:
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'

@laisiewcheng
Copy link

Use this link
https://drive.google.com/file/d/19NWziHWh1LgCcHU34geoKwYezAogv9fX/view

May I know this is pretrained using what dataset? Sports1M?

@skyqwe123
Copy link

Can you run inference.py with pretrained model?
I run inference.py and see error:
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
I have a similar problem. Have you solved it

@marsna
Copy link

marsna commented Mar 10, 2021 via email

@skyqwe123
Copy link

I didn't solve it in the end, even though I asked for help via email.

------------------ 原始邮件 ------------------ 发件人: "jfzhang95/pytorch-video-recognition" <[email protected]>; 发送时间: 2021年3月9日(星期二) 晚上9:13 收件人: "jfzhang95/pytorch-video-recognition"<[email protected]>; 抄送: "Mars.Nan"<[email protected]>;"Mention"<[email protected]>; 主题: Re: [jfzhang95/pytorch-video-recognition] I can't download pretrained model (#44) Can you run inference.py with pretrained model? I run inference.py and see error: 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 I have a similar problem. Have you solved it — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

@marsna I have solved it, change the code like this, it works for me:
model = C3D(num_classes=101, pretrained=True)
model.to(device)
model.eval()

@vsumm
Copy link

vsumm commented Aug 27, 2022

model = C3D(num_classes=101, pretrained=True)
model.to(device)
model.eval()

@skyqwe123

Thanks for giving an idea to resolve the state_dict error. you cant use C3D directly instead of use

    model = C3D_model.C3D(num_classes=101, pretrained=True)
    model.to(device)
    model.eval()

use this in inference.py

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

6 participants