How to initialize tok2vec Transformer with a custom spacy ner model? #10114
-
I have some trouble with the initialization of a tok2vec Transformer with a custom spacy ner model. How do I use tok2vec properly before the ner step starts in the pipeline? Init
Training:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm a little confused at what you're trying to do here.
You don't want a tok2vec and a transformer component in the same pipeline - they replace each other. (This can be different if you use Also I see you're using a custom training loop, but note we don't recommend that in v3 - it's much easier to avoid problems using the training config. Maybe taking a look at the spaCy course would help. |
Beta Was this translation helpful? Give feedback.
I'm a little confused at what you're trying to do here.
You don't want a tok2vec and a transformer component in the same pipeline - they replace each other. (This can be different if you use
replace_listeners
, but that doesn't look like what you're doing here.)Also I see you're using a custom training loop, but note we don't recommend that in v3 - it's much easier to avoid problems using the training config. Maybe tak…