mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
Update model after optimising it instead of waiting
This commit is contained in:
parent
711278b667
commit
2bf21cbe29
|
@ -391,9 +391,10 @@ class Language(object):
|
||||||
for name, proc in pipes:
|
for name, proc in pipes:
|
||||||
if not hasattr(proc, 'update'):
|
if not hasattr(proc, 'update'):
|
||||||
continue
|
continue
|
||||||
|
grads = {}
|
||||||
proc.update(docs, golds, drop=drop, sgd=get_grads, losses=losses)
|
proc.update(docs, golds, drop=drop, sgd=get_grads, losses=losses)
|
||||||
for key, (W, dW) in grads.items():
|
for key, (W, dW) in grads.items():
|
||||||
sgd(W, dW, key=key)
|
sgd(W, dW, key=key)
|
||||||
|
|
||||||
def preprocess_gold(self, docs_golds):
|
def preprocess_gold(self, docs_golds):
|
||||||
"""Can be called before training to pre-process gold data. By default,
|
"""Can be called before training to pre-process gold data. By default,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user