espnet2.speechlm.bin.inference.load_checkpoint
Less than 1 minute
espnet2.speechlm.bin.inference.load_checkpoint
espnet2.speechlm.bin.inference.load_checkpoint(model, checkpoint_path)
Load model checkpoint.
- Parameters:
- model – The model instance to load weights into.
- checkpoint_path – Path to the checkpoint file containing model weights.
- Returns: The model instance with loaded weights.
- Raises:
- KeyError – If ‘module’ key is not found in checkpoint.
- RuntimeError – If checkpoint loading fails or state dict doesn’t match.
