burn::record

Type Alias SensitiveCompactRecorder

pub type SensitiveCompactRecorder = BinGzFileRecorder<HalfPrecisionSettings>;
Expand description

Recorder optimized for compactness making it a good choice for model deployment.

It uses the bincode format for serialization and half precision. This format is not resilient to type changes since no metadata is encoded. Favor default recorder or compact recorder for long term data storage.

Aliased Type§

struct SensitiveCompactRecorder { /* private fields */ }

Implementations

§

impl<S> BinGzFileRecorder<S>

pub fn new() -> BinGzFileRecorder<S>

Constructs a new BinGzFileRecorder.

Trait Implementations

§

impl<S> Clone for BinGzFileRecorder<S>

§

fn clone(&self) -> BinGzFileRecorder<S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<S> Debug for BinGzFileRecorder<S>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<S> Default for BinGzFileRecorder<S>

§

fn default() -> BinGzFileRecorder<S>

Returns the “default value” for a type. Read more
§

impl<S, B> FileRecorder<B> for BinGzFileRecorder<S>

§

fn file_extension() -> &'static str

File extension of the format used by the recorder.
§

impl<S, B> Recorder<B> for BinGzFileRecorder<S>

§

type Settings = S

Type of the settings used by the recorder.
§

type RecordArgs = PathBuf

Arguments used to record objects.
§

type RecordOutput = ()

Record output type.
§

type LoadArgs = PathBuf

Arguments used to load recorded objects.
§

fn save_item<I>( &self, item: I, file: <BinGzFileRecorder<S> as Recorder<B>>::RecordArgs, ) -> Result<(), RecorderError>
where I: Serialize,

Saves an item. Read more
§

fn load_item<I>( &self, file: <BinGzFileRecorder<S> as Recorder<B>>::LoadArgs, ) -> Result<I, RecorderError>

Loads an item. Read more
§

fn record<R>( &self, record: R, args: Self::RecordArgs, ) -> Result<Self::RecordOutput, RecorderError>
where R: Record<B>,

Records an item. Read more
§

fn load<R>( &self, args: Self::LoadArgs, device: &<B as Backend>::Device, ) -> Result<R, RecorderError>
where R: Record<B>,

Load an item from the given arguments.