diff --git a/spacy/pipeline/tok2vec.py b/spacy/pipeline/tok2vec.py index afd9b554f..75654145b 100644 --- a/spacy/pipeline/tok2vec.py +++ b/spacy/pipeline/tok2vec.py @@ -59,10 +59,10 @@ class Tok2Vec(Pipe): YIELDS (iterator): A sequence of `Doc` objects, in order of input. """ for docs in minibatch(stream, batch_size): - batch = list(batch) + docs = list(docs) tokvecses = self.predict(docs) self.set_annotations(docs, tokvecses) - yield from batch + yield from docs def predict(self, docs): """Return a single tensor for a batch of documents.