Spacy ver 3.2.2. 1 pipeline with 2 spancat pipes #10759
-
I wanted to create and separately, independently train 2 spancat models in one pipeline. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you use a different key to store the spans, you can train two spancats at the same time without issue. The one decision you'll have to make is how independent you want the spancats to be. You could have two separate components that share a single tok2vec. In this case they are not totally independent since they share the tok2vec, but they won't directly interfere with each other, and they can easily be trained at the same time. If you really want them totally independent of each other, I would train them separately and use Given your note about easily confused labels, I would recommend you try both of the above approaches, plus combining all your labels, and comparing performance. |
Beta Was this translation helpful? Give feedback.
If you use a different key to store the spans, you can train two spancats at the same time without issue. The one decision you'll have to make is how independent you want the spancats to be.
You could have two separate components that share a single tok2vec. In this case they are not totally independent since they share the tok2vec, but they won't directly interfere with each other, and they can easily be trained at the same time.
If you really want them totally independent of each other, I would train them separately and use
spacy assemble
to combine them after they're trained. The double NER tutorial may be useful here.Given your note about easily confused labels, I would recommend you…