Update example

This commit is contained in:
ines 2017-11-06 02:40:44 +01:00
parent 68b7e3a33a
commit 47969e306b

View File

@ -40,7 +40,7 @@ def main(model=None, output_dir=None, n_iter=20, n_texts=2000):
# Create the PyTorch neural network model, and wrap it with Thinc. This # Create the PyTorch neural network model, and wrap it with Thinc. This
# gives it the API that spaCy expects. # gives it the API that spaCy expects.
pt_model = create_model() pt_model = create_model()
textcat = thinc.extra.wrappers.PytorchWrapper(pt_model) textcat = thinc.extra.wrappers.PyTorchWrapper(pt_model)
nlp.add_pipe(textcat, last=True) nlp.add_pipe(textcat, last=True)
# add label to text classifier # add label to text classifier