pub fn load_weights(path: impl AsRef<Path>, model: &dyn Module) -> Result<()>Expand description
Load module parameters, persistent buffers, and scalar state from a native
OA .oam file on the active default runtime, ignoring any optimizer block.
Works for both weights-only files created by save_weights and full
training checkpoints created by save_checkpoint (policy-only reload).
ยงErrors
Returns crate::ErrorKind::CheckpointCorrupt for malformed, truncated, or
integrity-invalid .oam data, or another error when the destination module
does not match the file or runtime ownership.