Trait zyx_core::io::ModuleIO

source ·
pub trait ModuleIO {
    // Required methods
    fn save(self, path: impl AsRef<Path>) -> Result<(), ZyxError>;
    fn load(self, path: impl AsRef<Path>) -> Result<(), ZyxError>;
}
Expand description

This trait is implemented automatically for all modules that implement IntoIterator<Item = &mut Tensor>

Required Methods§

source

fn save(self, path: impl AsRef<Path>) -> Result<(), ZyxError>

Save self into path

source

fn load(self, path: impl AsRef<Path>) -> Result<(), ZyxError>

Load self from path

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, B: Backend + 'a, Tensors: IntoIterator<Item = &'a mut Tensor<B>>> ModuleIO for Tensors