mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Reduce batch size during pretrain
This commit is contained in:
parent
83ac227bd3
commit
df15279e88
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user