MCPcopy
hub / github.com/yangchris11/samurai / _call_model_initializer

Method _call_model_initializer

sam2/training/trainer.py:412–420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

410 self._call_model_initializer()
411
412 def _call_model_initializer(self):
413 model_weight_initializer = instantiate(
414 self.checkpoint_conf.model_weight_initializer
415 )
416 if model_weight_initializer is not None:
417 logging.info(
418 f"Loading pretrained checkpoint from {self.checkpoint_conf.model_weight_initializer}"
419 )
420 self.model = model_weight_initializer(model=self.model)
421
422 def _load_resuming_checkpoint(self, ckpt_path: str):
423 logging.info(f"Resuming training from {ckpt_path}")

Callers 2

load_checkpointMethod · 0.95
_init_model_stateMethod · 0.95

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected