Fix NeuralLabeller

This commit is contained in:
Matthew Honnibal 2017-08-06 14:15:14 +02:00
parent 0acce0521b
commit 3cb8f06881

View File

@ -296,7 +296,6 @@ class NeuralTagger(BaseThincComponent):
if self.model.nI is None:
self.model.nI = tokvecs[0].shape[1]
tag_scores, bp_tag_scores = self.model.begin_update(docs_tokvecs, drop=drop)
loss, d_tag_scores = self.get_loss(docs, golds, tag_scores)
@ -432,7 +431,7 @@ class NeuralLabeller(NeuralTagger):
@property
def labels(self):
return self.cfg.get('labels', {})
return self.cfg.setdefault('labels', {})
@labels.setter
def labels(self, value):