Fix batch size in parser.pipe

This commit is contained in:
Matthew Honnibal 2018-12-06 21:45:56 +01:00
parent bb3304a4f1
commit d896fbca62
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ cdef class Parser:
for batch in util.minibatch(docs, size=batch_size):
batch_in_order = list(batch)
by_length = sorted(batch_in_order, key=lambda doc: len(doc))
for subbatch in util.minibatch(by_length, size=8):
for subbatch in util.minibatch(by_length, size=batch_size//4):
subbatch = list(subbatch)
parse_states = self.predict(subbatch, beam_width=beam_width,
beam_density=beam_density)