Skip to content
Discussion options

You must be logged in to vote

Could you try changing

textcat.initialize(lambda: examples, nlp=nlp, labels=labels)
optimizer = nlp.resume_training()

to

optimizer = nlp.initialize(lambda: examples)

The textcat labels are included in your examples, so they should be deduced automatically, you don't have to call add_label specifically or define the labels variable.

Also - make sure that your transformer is BEFORE the textcat in the pipeline, because the TransformerListener assumes that the transformer has already processed that batch of text.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ines
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / textcat Feature: Text Classifier
2 participants