Fix multi-task objective for parser

This commit is contained in:
Matthew Honnibal 2018-09-13 14:08:55 +02:00
parent 21321cd6cf
commit a95eea4c06

View File

@ -1172,7 +1172,7 @@ cdef class DependencyParser(Parser):
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
for labeller in self._multitasks:
tok2vec = self.model[0]
tok2vec = self.model.tok2vec
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
tok2vec=tok2vec, sgd=sgd)
@ -1193,7 +1193,7 @@ cdef class EntityRecognizer(Parser):
def init_multitask_objectives(self, get_gold_tuples, pipeline, sgd=None, **cfg):
for labeller in self._multitasks:
tok2vec = self.model[0]
tok2vec = self.model.tok2vec
labeller.begin_training(get_gold_tuples, pipeline=pipeline,
tok2vec=tok2vec)