From df15279e88311f207407cec01d705cd569316258 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 10 Dec 2018 15:30:23 +0000 Subject: [PATCH] Reduce batch size during pretrain --- spacy/cli/pretrain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/pretrain.py b/spacy/cli/pretrain.py index 598739246..9a9d9e213 100644 --- a/spacy/cli/pretrain.py +++ b/spacy/cli/pretrain.py @@ -110,7 +110,7 @@ def pretrain( msg.row(("#", "# Words", "Total Loss", "Loss", "w/s"), **row_settings) for epoch in range(nr_iter): for batch in util.minibatch_by_words( - ((text, None) for text in texts), size=5000 + ((text, None) for text in texts), size=3000 ): docs = make_docs(nlp, [text for (text, _) in batch]) loss = make_update(model, docs, optimizer, drop=dropout)