pub trait Config: Serialize + DeserializeOwned {
// Provided methods
fn save<P: AsRef<Path>>(&self, file: P) -> Result<()> { ... }
fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError> { ... }
fn load_binary(data: &[u8]) -> Result<Self, ConfigError> { ... }
}
Expand description
Configuration trait.
Provided Methods§
Sourcefn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
Available on crate feature std
only.
fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
std
only.Sourcefn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
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§
impl Config for GradientClippingConfig
impl Config for Initializer
impl Config for PaddingConfig1d
impl Config for PaddingConfig2d
impl Config for PaddingConfig3d
impl Config for CosineAnnealingLrSchedulerConfig
Available on crate feature
std
only.impl Config for ExponentialLrSchedulerConfig
Available on crate feature
std
only.impl Config for LinearLrSchedulerConfig
Available on crate feature
std
only.impl Config for NoamLrSchedulerConfig
Available on crate feature
std
only.impl Config for StepLrSchedulerConfig
Available on crate feature
std
only.