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

Method apply_ckpt

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

Source from the content-addressed store, hash-verified

59 self.automatic_optimization = False
60
61 def apply_ckpt(self, ckpt: Union[None, str, dict]):
62 if ckpt is None:
63 return
64 if isinstance(ckpt, str):
65 ckpt = {
66 "target": "sgm.modules.checkpoint.CheckpointEngine",
67 "params": {"ckpt_path": ckpt},
68 }
69 engine = instantiate_from_config(ckpt)
70 engine(self)
71
72 @abstractmethod
73 def get_input(self, batch) -> Any:

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

instantiate_from_configFunction · 0.50

Tested by

no test coverage detected