Looking for a Multi-task example of two multi label text classifiers #9810
-
I wish to train a shared encoder that performs text classification with two outputs. Basically a nn with two heads, and each head is a multi-label classifier. My dataframe:
So I dont wish this to be a multi-label classifier since the two categories can be very different, I would like it to be a multi-task network. I cannot find any python examples on the docs on how to this with two multi-label text classifiers, but it states that spacy uses multi-task learning. Looking for a code example of how to use two |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We don't have an example for this. spaCy uses multi-task learning, but having multiple classifier heads is a case we hadn't considered. We usually use the multi-task functionality for things like tagger+parser. That said, it should work fine if you add two Going to link your previous question, since it's closely related: #9677 |
Beta Was this translation helpful? Give feedback.
We don't have an example for this. spaCy uses multi-task learning, but having multiple classifier heads is a case we hadn't considered. We usually use the multi-task functionality for things like tagger+parser.
That said, it should work fine if you add two
textcat
components and explicitly specify their labels (rather than letting them be inferred from the data). If you try that and have issues let us know.Going to link your previous question, since it's closely related: #9677