mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-05 21:53:05 +03:00
Fix minimum gradient and beam density
This commit is contained in:
parent
2db43e9662
commit
d3b0447898
|
@ -71,7 +71,7 @@ def get_templates(name):
|
||||||
|
|
||||||
|
|
||||||
cdef int BEAM_WIDTH = 16
|
cdef int BEAM_WIDTH = 16
|
||||||
cdef weight_t BEAM_DENSITY = 0.01
|
cdef weight_t BEAM_DENSITY = 0.001
|
||||||
|
|
||||||
cdef class BeamParser(Parser):
|
cdef class BeamParser(Parser):
|
||||||
cdef public int beam_width
|
cdef public int beam_width
|
||||||
|
@ -116,7 +116,7 @@ cdef class BeamParser(Parser):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
violn.check_crf(pred, gold)
|
violn.check_crf(pred, gold)
|
||||||
min_grad = 0.1 ** (itn+1)
|
min_grad = 0.01 ** (itn+1)
|
||||||
histories = zip(violn.p_probs, violn.p_hist) + zip(violn.g_probs, violn.g_hist)
|
histories = zip(violn.p_probs, violn.p_hist) + zip(violn.g_probs, violn.g_hist)
|
||||||
random.shuffle(histories)
|
random.shuffle(histories)
|
||||||
for grad, hist in histories:
|
for grad, hist in histories:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user