From 0a566dc320a1103569df90791e1ede24f513e78e Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 6 Aug 2017 02:18:12 +0200 Subject: [PATCH] Add update_tensors flag to Language.update. Experimental, re #1182 --- spacy/cli/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index af028dae5..9ed621c12 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -91,7 +91,8 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=20, n_sents=0, for batch in minibatch(train_docs, size=batch_sizes): docs, golds = zip(*batch) nlp.update(docs, golds, sgd=optimizer, - drop=next(dropout_rates), losses=losses) + drop=next(dropout_rates), losses=losses, + update_tensors=True) pbar.update(sum(len(doc) for doc in docs)) with nlp.use_params(optimizer.averages):