mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Bug fix in caching_eval
This commit is contained in:
parent
d26ee2bf81
commit
f5d4fb092d
@ -265,7 +265,7 @@ class CachingEvalFunction(torch.autograd.Function):
|
||||
y2 = m(x)
|
||||
assert torch.allclose(y, y2, atol=1.0e-02)
|
||||
# this call to backward() should create grads in the module's parameters
|
||||
y.backward(gradient=y_grad)
|
||||
y2.backward(gradient=y_grad)
|
||||
|
||||
# restore the state from before we entered this function
|
||||
random.setstate(random_state)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user