mirror of https://github.com/explosion/spaCy.git
Add tok2vec property to parser model
This commit is contained in:
parent
d6aa60139d
commit
21321cd6cf
|
@ -192,6 +192,10 @@ class ParserModel(Model):
|
||||||
Model.__init__(self)
|
Model.__init__(self)
|
||||||
self._layers = [tok2vec, lower_model, upper_model]
|
self._layers = [tok2vec, lower_model, upper_model]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def tok2vec(self):
|
||||||
|
return self._layers[0]
|
||||||
|
|
||||||
def begin_update(self, docs, drop=0.):
|
def begin_update(self, docs, drop=0.):
|
||||||
step_model = ParserStepModel(docs, self._layers, drop=drop)
|
step_model = ParserStepModel(docs, self._layers, drop=drop)
|
||||||
def finish_parser_update(golds, sgd=None):
|
def finish_parser_update(golds, sgd=None):
|
||||||
|
|
Loading…
Reference in New Issue