Fix eval batch size

This commit is contained in:
Matthw Honnibal 2020-07-01 15:16:25 +02:00
parent c5d12d1a22
commit 2fa56484b2
1 changed files with 2 additions and 2 deletions

View File

@ -337,9 +337,9 @@ def create_evaluation_callback(nlp, optimizer, corpus, cfg):
if optimizer.averages: if optimizer.averages:
with nlp.use_params(optimizer.averages): with nlp.use_params(optimizer.averages):
scorer = nlp.evaluate(dev_examples, batch_size=eval_batch_size) scorer = nlp.evaluate(dev_examples, batch_size=batch_size)
else: else:
scorer = nlp.evaluate(dev_examples, batch_size=eval_batch_size) scorer = nlp.evaluate(dev_examples, batch_size=batch_size)
end_time = timer() end_time = timer()
wps = n_words / (end_time - start_time) wps = n_words / (end_time - start_time)
scores = scorer.scores scores = scorer.scores