From 64fc840a5dc04161c89e8ce399fe9ceebdc6b0ba Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 18 Jun 2020 15:24:40 +0200 Subject: [PATCH] bugfix tok2vec --- spacy/pipeline/tok2vec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.