This commit is contained in:
James Betker 2022-01-24 18:05:45 -07:00
parent 3a9e3a9db3
commit cc0d9f7216

View File

@ -129,7 +129,7 @@ class BaseModel():
network.load_state_dict(load_net_clean, strict=strict) network.load_state_dict(load_net_clean, strict=strict)
def consolidate_state(self, state): def consolidate_state(self):
for o in self.optimizers: for o in self.optimizers:
if isinstance(o, ZeroRedundancyOptimizer): if isinstance(o, ZeroRedundancyOptimizer):
state['optimizers'].append(o.consolidate_state_dict(to=0)) state['optimizers'].append(o.consolidate_state_dict(to=0))