MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / save

Method save

sat/sgm/modules/autoencoding/magvit2_pytorch.py:1359–1365  ·  view source on GitHub ↗
(self, path, overwrite=True)

Source from the content-addressed store, hash-verified

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)

Callers 14

transform_param.pyFile · 0.80
transform_param.pyFile · 0.80
transform_param.pyFile · 0.80
transform_param.pyFile · 0.80
transform_param.pyFile · 0.80
transform_param.pyFile · 0.80
save_on_masterFunction · 0.80
transform_param.pyFile · 0.80
save_on_masterFunction · 0.80
save_checkpointFunction · 0.80

Calls 2

state_dictMethod · 0.95
existsMethod · 0.80

Tested by

no test coverage detected