def __call__(self, module):
    from deep3dmap.runners import _load_checkpoint_with_prefix, load_checkpoint, load_state_dict
    logger = get_logger('deep3dmap')
    if (self.prefix is None):
        print_log(f'load model from: {self.checkpoint}', logger=logger)
        load_checkpoint(module, self.checkpoint, map_location=self.map_location, strict=False, logger=logger)
    else:
        print_log(f'load {self.prefix} in model from: {self.checkpoint}', logger=logger)
        state_dict = _load_checkpoint_with_prefix(self.prefix, self.checkpoint, map_location=self.map_location)
        load_state_dict(module, state_dict, strict=False, logger=logger)
    if hasattr(module, '_params_init_info'):
        update_init_info(module, init_info=self._get_init_info())
def __call__(self, module):
    from deep3dmap.runners import _load_checkpoint_with_prefix, load_checkpoint, load_state_dict
    logger = get_logger('deep3dmap')
    if (self.prefix is None):
        print_log(f'load model from: {self.checkpoint}', logger=logger)
        load_checkpoint(module, self.checkpoint, map_location=self.map_location, strict=False, logger=logger)
    else:
        print_log(f'load {self.prefix} in model from: {self.checkpoint}', logger=logger)
        state_dict = _load_checkpoint_with_prefix(self.prefix, self.checkpoint, map_location=self.map_location)
        load_state_dict(module, state_dict, strict=False, logger=logger)
    if hasattr(module, '_params_init_info'):
        update_init_info(module, init_info=self._get_init_info())