diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index f5c0454bc..f79837fae 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -422,9 +422,9 @@ cdef class Parser: hW = hidden_weights.data hb = hidden_bias.data cdef int nr_hidden = hidden_weights.shape[0] - + cdef int nr_task = states.size() with nogil: - for i in cython.parallel.prange(states.size(), num_threads=2, + for i in cython.parallel.prange(nr_task, num_threads=2, schedule='guided'): self._parseC(states[i], feat_weights, hW, hb,