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 train
instead 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
tagger
without modifying any other components in the pipeline, then usereplace_listeners
to create an internal copy of thetok2vec
model within thetagger
so that thetagger
can be updated independently of all other components.If you want to update
tagger
without replacing the listener:tok2vec
enabled in the pipeline.tagger
without modifyingtok2vec
, then…