Skip to content

Spancat, Textcat pipeline model training assistance #11663

Discussion options

You must be logged in to vote

First, to explain why you need replace_listeners...

The "sharing embeddings" section of the docs may be helpful for understanding why you need to replace listeners.

When you train a model with a tok2vec, they learn and change together. You can think of them like interlocking puzzles pieces. But since the tok2vec changes in the process of training, if there are any components that used it before, they no longer fit together because the shape changed. So a component always needs to be used with the tok2vec it was trained with.

The listeners pattern is used so that multiple components can be trained with one tok2vec at the same time, so that they all fit together. This is faster and takes up…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@paocarvajal1912
Comment options

@polm
Comment options

@paocarvajal1912
Comment options

Answer selected by paocarvajal1912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / textcat Feature: Text Classifier feat / spancat Feature: Span Categorizer
2 participants