(self, ckpt_path)
| 160 | # return feature[0] |
| 161 | |
| 162 | def load_pretrained(self, ckpt_path): |
| 163 | checkpoint = torch.load(ckpt_path, map_location='cpu') |
| 164 | motion_ckpt = OrderedDict() |
| 165 | for key in checkpoint['state_dict'].keys(): |
| 166 | if key.startswith('motion_encoder'): |
| 167 | new_key = key[15:] |
| 168 | motion_ckpt[new_key] = checkpoint['state_dict'][key] |
| 169 | self.load_state_dict(motion_ckpt) |
| 170 | |
| 171 | |
| 172 | @SUBMODULES.register_module() |
nothing calls this directly
no outgoing calls
no test coverage detected