Error in training crnn_vgg16_bn on custom data #709
-
Hi, I am trying to train crnn_vgg16_bn on custom dataset on colab using tensorflow. Running the training using this:
I am getting the following error when using the default vocab:
And when I am using the latin vocab:
And the error:
But when i am not using the pretrained argument the training works fine. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
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! Have a nice day! |
Beta Was this translation helpful? Give feedback.
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!