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

Method apply_ckpt

sat/vae_modules/autoencoder.py:70–73  ·  view source on GitHub ↗
(self, ckpt: Union[None, str, dict])

Source from the content-addressed store, hash-verified

68 # engine(self)
69
70 def apply_ckpt(self, ckpt: Union[None, str, dict]):
71 if ckpt is None:
72 return
73 self.init_from_ckpt(ckpt)
74
75 def init_from_ckpt(self, path, ignore_keys=list()):
76 sd = torch.load(path, map_location="cpu")["state_dict"]

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

init_from_ckptMethod · 0.95

Tested by

no test coverage detected