mirror of https://github.com/explosion/spaCy.git
Small hack in Language.update to make torch work
This commit is contained in:
parent
445b81ce3f
commit
a26fe8e7bb
|
@ -426,6 +426,10 @@ class Language(object):
|
||||||
def get_grads(W, dW, key=None):
|
def get_grads(W, dW, key=None):
|
||||||
grads[key] = (W, dW)
|
grads[key] = (W, dW)
|
||||||
|
|
||||||
|
get_grads.alpha = sgd.alpha
|
||||||
|
get_grads.b1 = sgd.b1
|
||||||
|
get_grads.b2 = sgd.b2
|
||||||
|
|
||||||
pipes = list(self.pipeline)
|
pipes = list(self.pipeline)
|
||||||
random.shuffle(pipes)
|
random.shuffle(pipes)
|
||||||
for name, proc in pipes:
|
for name, proc in pipes:
|
||||||
|
|
Loading…
Reference in New Issue