try w/ gil

This commit is contained in:
envolution 2024-11-30 15:29:32 -05:00
parent 7ef2346598
commit 93c95ab8e5

View File

@ -527,7 +527,7 @@ cdef class precompute_hiddens:
return state_vector, backprop_relu return state_vector, backprop_relu
cdef inline int _arg_max(float[:] scores, const int n_classes) nogil: cdef inline int _arg_max(float[:] scores, const int n_classes):
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
@ -539,3 +539,4 @@ cdef class precompute_hiddens:
best = i best = i
return best return best