mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Fix support for parser multi-task objectives
This commit is contained in:
parent
323fc26880
commit
0369db75c1
|
@ -373,6 +373,8 @@ cdef class Parser:
|
||||||
if losses is None:
|
if losses is None:
|
||||||
losses = {}
|
losses = {}
|
||||||
losses.setdefault(self.name, 0.)
|
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
|
# The probability we use beam update, instead of falling back to
|
||||||
# a greedy update
|
# a greedy update
|
||||||
beam_update_prob = self.cfg.get('beam_update_prob', 1.0)
|
beam_update_prob = self.cfg.get('beam_update_prob', 1.0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user