(self, path, overwrite=True)
| 1357 | return super().load_state_dict(*args, **kwargs) |
| 1358 | |
| 1359 | def save(self, path, overwrite=True): |
| 1360 | path = Path(path) |
| 1361 | assert overwrite or not path.exists(), f"{str(path)} already exists" |
| 1362 | |
| 1363 | pkg = dict(model_state_dict=self.state_dict(), version=__version__, config=self._configs) |
| 1364 | |
| 1365 | torch.save(pkg, str(path)) |
| 1366 | |
| 1367 | def load(self, path, strict=True): |
| 1368 | path = Path(path) |
no test coverage detected