Can't use textcat with pre-trained model #12421
Replies: 1 comment 2 replies
-
Thanks for your question! If you want to train a model for text classification specifically, it is better to start from a fresh, pretrained transformer model. You can start with a fresh pretrained transformer by generating a configuration for a textcat pipeline using the quickstart. To give some more background on the error that you get --- the code example is not complete enough to reproduce the error, but it looks like the Thinc model is not properly initialized. The pipe needs to be initialized using the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote the following code to train a BERT-Model for Text Classification.
When I use a blank Model everything works fine, but when using a pre-trained model i get this error:
...lib\site-packages\thinc\model.py", line 175, in get_dim
raise ValueError(err)
ValueError: Cannot get dimension 'nO' for model 'sparse_linear': value unset
initialize the model
Beta Was this translation helpful? Give feedback.
All reactions