Update existing part-of-speech tagger without updating tok2vec weights #10246
-
|
Hello everyone, I am trying to build a custom train loop to update existing tagger weights with new examples. `other_pipes = [pipe for pipe in nlp.pipe_names if pipe != 'tagger'] Spacy complains with this error: ValueError: [E954] The Tok2Vec listener did not receive any valid input from an upstream component. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Let me go from general recommendations to the specific questions:
|
Beta Was this translation helpful? Give feedback.
Let me go from general recommendations to the specific questions:
In general, we strongly recommend using
spacy traininstead of a custom training loop. If you prefer to do it programmatically, you can also access the training methods directly inspacy.training.loop.If you want to update
taggerwithout modifying any other components in the pipeline, then usereplace_listenersto create an internal copy of thetok2vecmodel within thetaggerso that thetaggercan be updated independently of all other components.If you want to update
taggerwithout replacing the listener:tok2vecenabled in the pipeline.taggerwithout modifyingtok2vec, then…