Set a more aggressive threshold on the max violn update

This commit is contained in:
Matthew Honnibal 2018-05-10 15:38:24 +02:00
parent 8e8724b55b
commit 614d45ea58

View File

@ -209,7 +209,8 @@ def update_beam(TransitionSystem moves, int nr_feature, int max_steps,
# Track the "maximum violation", to use in the update.
for i, violn in enumerate(violns):
violn.check_crf(pbeam[i], gbeam[i])
if pbeam[i].loss > 0 and pbeam[i].min_score > (gbeam[i].score * 1.5):
# Use 'early update' if best gold is way out of contention.
if pbeam[i].loss > 0 and pbeam[i].min_score > (gbeam[i].score * 5.00):
pbeam.dones[i] = True
gbeam.dones[i] = True
histories = []