Don't reapply the model during training

This commit is contained in:
Matthew Honnibal 2017-03-16 11:59:43 -05:00
parent c90dc7ac29
commit 55f813bfbb

View File

@ -47,7 +47,8 @@ class Trainer(object):
for process in self.nlp.pipeline: for process in self.nlp.pipeline:
if hasattr(process, 'update'): if hasattr(process, 'update'):
loss = process.update(doc, gold, itn=self.nr_epoch) loss = process.update(doc, gold, itn=self.nr_epoch)
process(doc) else:
process(doc)
return doc return doc
def evaluate(self, dev_sents, gold_preproc=False): def evaluate(self, dev_sents, gold_preproc=False):