mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-20 21:40:35 +03:00
try fix gil require issue
This commit is contained in:
parent
e67cf1a5a5
commit
7ef2346598
|
@ -527,7 +527,7 @@ cdef class precompute_hiddens:
|
||||||
|
|
||||||
return state_vector, backprop_relu
|
return state_vector, backprop_relu
|
||||||
|
|
||||||
cdef inline int _arg_max(const float* scores, const int n_classes) nogil:
|
cdef inline int _arg_max(float[:] scores, const int n_classes) nogil:
|
||||||
if n_classes == 2:
|
if n_classes == 2:
|
||||||
return 0 if scores[0] > scores[1] else 1
|
return 0 if scores[0] > scores[1] else 1
|
||||||
cdef int i
|
cdef int i
|
||||||
|
@ -537,4 +537,5 @@ cdef class precompute_hiddens:
|
||||||
if scores[i] > mode:
|
if scores[i] > mode:
|
||||||
mode = scores[i]
|
mode = scores[i]
|
||||||
best = i
|
best = i
|
||||||
return best
|
return best
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user