Load data from a model spec into EMA model
(self, state_dict, build_fp32_params=False)
| 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. |
no test coverage detected