NER Training with Frozen Tok2Vec causes "The Tok2Vec listener did not receive any valid input from an upstream component." #9225
-
How to reproduce the behaviour
Result
Expected Your Environment
ScenarioI am trying to train a NER model starting from the en_core_web_md model. Once done, I am creating a pipeline that uses the newly trained NER model, plus the Tagger, DependencyParser, attribute_ruler and other components from the original en_core_web_md. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you put the
|
Beta Was this translation helpful? Give feedback.
If you put the
tok2vec
infrozen_components
, it's not run at all during training. If you want to train a component that depends on its output, then you also need to addtok2vec
toannotating_components
so that it's run in order to setdoc.tensors
during training. See: https://spacy.io/usage/training#annotating-componentsannotating_components
requires spaCy v3.1+.