pub struct PtCheckpoint { /* private fields */ }Implementations§
Source§impl PtCheckpoint
impl PtCheckpoint
pub fn load(path: impl AsRef<Path>, opts: LoadOptions) -> Result<Self>
pub fn from_metadata( metadata: CheckpointMetadata, source: ReconstructSource, ) -> Result<Self>
pub fn metadata(&self) -> &CheckpointMetadata
pub fn source_sha256(&self) -> &str
pub fn warnings(&self) -> &[String]
pub fn tensor_count(&self) -> usize
pub fn state_dict(&self) -> Result<BTreeMap<String, TensorArray>>
pub fn export( &self, out_dir: impl AsRef<Path>, opts: ExportOptions, ) -> Result<ExportResult>
Trait Implementations§
Source§impl Clone for PtCheckpoint
impl Clone for PtCheckpoint
Source§fn clone(&self) -> PtCheckpoint
fn clone(&self) -> PtCheckpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PtCheckpoint
impl RefUnwindSafe for PtCheckpoint
impl Send for PtCheckpoint
impl Sync for PtCheckpoint
impl Unpin for PtCheckpoint
impl UnsafeUnpin for PtCheckpoint
impl UnwindSafe for PtCheckpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more