mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Fix multi-task objective for parser
This commit is contained in:
parent
21321cd6cf
commit
a95eea4c06
|
@ -1172,7 +1172,7 @@ cdef class DependencyParser(Parser):
|
||||||
|
|
||||||
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
|
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
|
||||||
for labeller in self._multitasks:
|
for labeller in self._multitasks:
|
||||||
tok2vec = self.model[0]
|
tok2vec = self.model.tok2vec
|
||||||
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
|
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
|
||||||
tok2vec=tok2vec, sgd=sgd)
|
tok2vec=tok2vec, sgd=sgd)
|
||||||
|
|
||||||
|
@ -1193,7 +1193,7 @@ cdef class EntityRecognizer(Parser):
|
||||||
|
|
||||||
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
|
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
|
||||||
for labeller in self._multitasks:
|
for labeller in self._multitasks:
|
||||||
tok2vec = self.model[0]
|
tok2vec = self.model.tok2vec
|
||||||
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
|
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
|
||||||
tok2vec=tok2vec)
|
tok2vec=tok2vec)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user