load_checkpoint

Function load_checkpoint 

Source
pub fn load_checkpoint<P: AsRef<Path>>(
    path: P,
    device: &Device,
) -> Result<HashMap<String, Tensor>>
Expand description

Load model parameters from checkpoint

§Arguments

  • path - Path to checkpoint file
  • device - Device to load tensors on

§Returns

HashMap of parameter name to tensor