Skip to content

RuntimeError: Error(s) in loading state_dict for RecognitionPredictor: #1417

Closed Answered by theadrianbao
theadrianbao asked this question in Q&A
Discussion options

You must be logged in to vote

Just resolved this issue and posting this for future reference:
I realized I had to use this guide and changed my code:

model = crnn_vgg16_bn(pretrained=False, pretrained_backbone=False)

This line I mentioned in my previous answer is no longer necessary:

finetuned_rec_model = {f"model.{key}": value for key, value in finetuned_rec_model.items()}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by theadrianbao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant