Update 'ner' tok2vec embeddings during training #10423
-
|
Based on my understanding of the 'ner' component, tok2vec ( and I have some code to extract the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
It's hard to know for sure without more info about the pipeline config and your custom code. If your If you have a separate In general, we strongly recommend using |
Beta Was this translation helpful? Give feedback.
It's hard to know for sure without more info about the pipeline config and your custom code.
If your
nerhas an internaltok2vecmodel (vs. listening to separatetok2veccomponent), then its weights should be updated in this loop.If you have a separate
tok2veccomponent (which is the pipeline design you'd get from the quickstart orinit config), then it won't be updated because you've disabled it in this context withnlp.disable_pipes.In general, we strongly recommend using
spacy traininstead of a custom training loop like this. If you want to do it programmatically,spacy trainis just a CLI wrapper around training methods that you can call directly if you wish.