(self, file)
| 174 | getattr(model, key).load_state_dict(ckpt_model[attr_mapping[key]]) |
| 175 | |
| 176 | def _torch_load(self, file): |
| 177 | if "cuda" in str(self.device): |
| 178 | return torch.load(file) |
| 179 | else: |
| 180 | return torch.load(file, map_location=lambda storage, loc: storage) |
| 181 | |
| 182 | def _get_vcs_fields(self): |
| 183 | """Returns a dict with git fields of the current repository |