Fix parser declaration

This commit is contained in:
Matthew Honnibal 2020-06-20 21:50:17 +02:00
parent 29d39d8a34
commit 2efe01bf26

View File

@ -273,6 +273,7 @@ cdef class Parser:
[eg.predicted for eg in examples])
states, golds, max_steps = self.moves.init_gold_batch(examples)
all_states = list(states)
states_golds = zip(states, golds)
for _ in range(max_steps):
if not states_golds:
break
@ -353,7 +354,6 @@ cdef class Parser:
def get_batch_loss(self, states, golds, float[:, ::1] scores, losses):
cdef StateClass state
cdef Example example
cdef Pool mem = Pool()
cdef int i