Skip to main content

Checkpointable

Trait Checkpointable 

Source
pub trait Checkpointable: Sized {
    // Required methods
    fn save(&self, path: &Path) -> Result<()>;
    fn load(self, path: &Path) -> Result<Self>;
}
Expand description

An agent whose weights can be saved to and loaded from disk.

Required Methods§

Source

fn save(&self, path: &Path) -> Result<()>

Save weights to path (without extension – implementations add their own).

Source

fn load(self, path: &Path) -> Result<Self>

Load weights from path, consuming and returning self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<E, Enc, Act, B, Buf> Checkpointable for DqnAgent<E, Enc, Act, B, Buf>