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

RuntimeError: Error(s) in loading state_dict for YOLOX: #5

Open
AouatifZ opened this issue Oct 28, 2022 · 2 comments
Open

RuntimeError: Error(s) in loading state_dict for YOLOX: #5

AouatifZ opened this issue Oct 28, 2022 · 2 comments

Comments

@AouatifZ
Copy link

my test generated the error

Unexpected key(s) in state_dict: "start_epoch", "model", "optimizer", "amp"

thanks in advance

@YINYIPENG-EN
Copy link
Owner

Your weight should be downloaded from the official website. This weight will contain the keys you mentioned. In my code, the weight loaded with torch.load only contains the model. You need to use torch. load ("yolox_s. pth") ['model '] to load the model.

@AouatifZ
Copy link
Author

thanks a lot for your help

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