Training with TextCatCNN.v2 does not improve #9548
-
I'm trying to train a textcat model using the
I'm not sure why this is happening because when using
I suspect some settings may be wrong in If you could help me figure out what's wrong I would be grateful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So investigating this took a while because you have several customizations that aren't relevant and there are some issues with your code.
4 is one of the main issues that was causing you trouble. The BOW model doesn't use tok2vec, so it wasn't clear your tok2vec was misconfigured. But when you tried to use it with the CNN, the tok2vec and the textcat aren't talking to each other, which is one problem. However even with that resolved your model won't learn. The issue is with the training data loader - when you load in examples, you are setting the value for the true category to 1, and not setting the other categories at all. This works with the BOW classifier but not with the CNN classifier. I'm not sure if this is a bug on our end or not, but for your purposes you can fix this by setting values for all categories. Fixed loader:
Working config:
|
Beta Was this translation helpful? Give feedback.
So investigating this took a while because you have several customizations that aren't relevant and there are some issues with your code.
while True
(if there is a reason for it it's not clear).