mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-05 04:13:05 +03:00
Check SGD is not None in update
This commit is contained in:
parent
6a42cc16ff
commit
ac6c25f762
|
@ -381,6 +381,7 @@ def fine_tune(embedding, combine=None):
|
|||
flat_grad = model.ops.flatten(d_output)
|
||||
model.d_mix[1] += flat_tokvecs.dot(flat_grad.T).sum()
|
||||
model.d_mix[0] += flat_vecs.dot(flat_grad.T).sum()
|
||||
if sgd is not None:
|
||||
sgd(model._mem.weights, model._mem.gradient, key=model.id)
|
||||
return d_output
|
||||
return output, fine_tune_bwd
|
||||
|
|
Loading…
Reference in New Issue
Block a user