Skip to content

Error in training crnn_vgg16_bn on custom data #709

Answered by charlesmindee
adesgautam asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @adesgautam,

When you use a pretrained recognition model, the model is built with vocab used for training, i.e the one in the cfg of the model. For the crnn_vgg16_bn, it is french_legacy, our old french vocab with 124 chars. In the training script, the default vocab is the french one which has 127 chars. So the model tries to match 2 different shapes. What you need to do is pass the --vocab 'legacy_french' arg to the training script if you want to use the pretrained version, otherwise if you want to specify your own vocabulary you need to start from scratch, otherwise the tensor shapes won't match!
I hope I am clear, let me know.

Have a nice day!

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@adesgautam
Comment options

@adesgautam
Comment options

@charlesmindee
Comment options

@charlesmindee
Comment options

@adesgautam
Comment options

Answer selected by adesgautam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
module: models Related to doctr.models ext: references Related to references folder topic: text recognition Related to the task of text recognition
2 participants