Reduce batch size during pretrain

This commit is contained in:
Matthew Honnibal 2018-12-10 15:30:23 +00:00
parent 83ac227bd3
commit df15279e88

View File

@ -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)