mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-14 04:22:21 +00:00
Fix to madam.py, RE optimizer state
This commit is contained in:
parent
dfe773aa78
commit
1d5e509261
@ -929,6 +929,7 @@ class Foam(object):
|
|||||||
"""Return state_dict."""
|
"""Return state_dict."""
|
||||||
return {
|
return {
|
||||||
"_step": self._step,
|
"_step": self._step,
|
||||||
|
"optimizer": self.optimizer.state_dict(),
|
||||||
}
|
}
|
||||||
|
|
||||||
def load_state_dict(self, state_dict):
|
def load_state_dict(self, state_dict):
|
||||||
@ -1049,6 +1050,7 @@ class Gloam(object):
|
|||||||
def state_dict(self):
|
def state_dict(self):
|
||||||
"""Return state_dict."""
|
"""Return state_dict."""
|
||||||
return {
|
return {
|
||||||
|
"optimizer": self.optimizer.state_dict(),
|
||||||
"_step": self._step,
|
"_step": self._step,
|
||||||
"_epoch": self._epoch,
|
"_epoch": self._epoch,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user