Fix support for parser multi-task objectives

This commit is contained in:
Matthew Honnibal 2018-11-30 19:53:31 +01:00
parent 323fc26880
commit 0369db75c1
1 changed files with 2 additions and 0 deletions

View File

@ -373,6 +373,8 @@ cdef class Parser:
if losses is None:
losses = {}
losses.setdefault(self.name, 0.)
for multitask in self._multitasks:
multitask.update(docs, golds, drop=drop, sgd=sgd)
# The probability we use beam update, instead of falling back to
# a greedy update
beam_update_prob = self.cfg.get('beam_update_prob', 1.0)