diff --git a/spacy/language.py b/spacy/language.py index d48fec048..65416f208 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -222,8 +222,9 @@ class Language(object): continue tokvecses, bp_tokvecses = tok2vec.model.begin_update(feats, drop=drop) d_tokvecses = proc.update((docs, tokvecses), golds, - drop=drop, sgd=sgd, losses=losses) - bp_tokvecses(d_tokvecses, sgd=sgd) + drop=drop, sgd=get_grads, losses=losses) + bp_tokvecses(d_tokvecses, sgd=get_grads) + break for key, (W, dW) in grads.items(): sgd(W, dW, key=key) # Clear the tensor variable, to free GPU memory.