mirror of https://github.com/explosion/spaCy.git
Remove 'rebatch' op, and remove min-batch cap
This commit is contained in:
parent
3376d4d6e8
commit
e84de028b5
|
@ -229,8 +229,6 @@ cdef class Parser:
|
||||||
nI=token_vector_width,
|
nI=token_vector_width,
|
||||||
pieces=maxout_pieces)
|
pieces=maxout_pieces)
|
||||||
|
|
||||||
lower = rebatch(1024, lower)
|
|
||||||
|
|
||||||
with Model.use_device('cpu'):
|
with Model.use_device('cpu'):
|
||||||
upper = chain(
|
upper = chain(
|
||||||
Maxout(hidden_width),
|
Maxout(hidden_width),
|
||||||
|
@ -342,8 +340,7 @@ cdef class Parser:
|
||||||
|
|
||||||
backprops = []
|
backprops = []
|
||||||
cdef float loss = 0.
|
cdef float loss = 0.
|
||||||
cutoff = max(1, len(todo) // 10)
|
while todo:
|
||||||
while len(todo) >= cutoff:
|
|
||||||
states, golds = zip(*todo)
|
states, golds = zip(*todo)
|
||||||
|
|
||||||
token_ids = self.get_token_ids(states)
|
token_ids = self.get_token_ids(states)
|
||||||
|
|
Loading…
Reference in New Issue