mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix regression in parser.begin_training()
This commit is contained in:
parent
1759abf1e5
commit
500898907b
|
@ -213,8 +213,7 @@ class ParserModel(Model):
|
|||
self._layers[-1]._layers[-1] = larger
|
||||
|
||||
def begin_training(self, X, y=None):
|
||||
for layer in self._layers:
|
||||
layer.begin_training(X, y=y)
|
||||
self.lower.begin_training(X, y=y)
|
||||
|
||||
@property
|
||||
def tok2vec(self):
|
||||
|
|
|
@ -525,8 +525,7 @@ cdef class Parser:
|
|||
else:
|
||||
if sgd is None:
|
||||
sgd = self.create_optimizer()
|
||||
self.model.begin_training(
|
||||
self.model.ops.allocate((5, cfg['token_vector_width'])))
|
||||
self.model.begin_training([])
|
||||
self.cfg.update(cfg)
|
||||
return sgd
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user