Use averaged params for evaluation
@@ -53,6 +53,7 @@ def train(lang_id, output_dir, train_data, dev_data, n_iter, n_sents,
golds = list(golds)
nlp.update(docs, golds, drop=dropout, sgd=optimizer)
pbar.update(len(docs))
+ with nlp.use_params(optimizer.averages):
scorer = nlp.evaluate(corpus.dev_docs(nlp))
print_progress(i, {}, scorer.scores)
with (output_path / 'model.bin').open('wb') as file_:
