MCPcopy
hub / github.com/modelscope/FunASR / restore

Method restore

funasr/models/data2vec/ema_module.py:75–79  ·  view source on GitHub ↗

Load data from a model spec into EMA model

(self, state_dict, build_fp32_params=False)

Source from the content-addressed store, hash-verified

73 self.fp32_params[param_key] = _to_float(state_dict[param_key])
74
75 def restore(self, state_dict, build_fp32_params=False):
76 """Load data from a model spec into EMA model"""
77 self.model.load_state_dict(state_dict, strict=False)
78 if build_fp32_params:
79 self.build_fp32_params(state_dict)
80
81 def set_decay(self, decay):
82 """Set decay.

Callers 3

_step_internalMethod · 0.95
hMFunction · 0.80
ZMFunction · 0.80

Calls 2

build_fp32_paramsMethod · 0.95
load_state_dictMethod · 0.45

Tested by

no test coverage detected