mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-19 05:54:20 +00:00
Fix bug that caused it to use too much memory
This commit is contained in:
parent
6873aa1a13
commit
d9a3eba370
@ -278,8 +278,7 @@ class NeutralGradient(Optimizer):
|
|||||||
if step_within_period == estimate_period:
|
if step_within_period == estimate_period:
|
||||||
self._estimate_projections(p, state, param_eps, param_rel_eps, param_pow)
|
self._estimate_projections(p, state, param_eps, param_rel_eps, param_pow)
|
||||||
state["step_within_period"] = 0
|
state["step_within_period"] = 0
|
||||||
|
elif step_within_period >= estimate_period - stats_steps:
|
||||||
if step_within_period >= estimate_period - stats_steps:
|
|
||||||
self._store_grad_stats(grad, state, max_fullcov_size)
|
self._store_grad_stats(grad, state, max_fullcov_size)
|
||||||
|
|
||||||
cur_grad = grad
|
cur_grad = grad
|
||||||
|
Loading…
x
Reference in New Issue
Block a user