pub trait NeuralNetwork<A>{
type Config: NetworkConfig<String, A>;
type Params<_A>;
// Required methods
fn config(&self) -> &Self::Config;
fn params(&self) -> &Self::Params<A>;
fn params_mut(&mut self) -> &mut Self::Params<A>;
}Expand description
The NeuralNetwork trait is used to define the network itself as well as each of its
constituent parts.
Required Associated Types§
Sourcetype Config: NetworkConfig<String, A>
type Config: NetworkConfig<String, A>
The configuration of the neural network defines its architecture and hyperparameters.
Required Methods§
Sourcefn params_mut(&mut self) -> &mut Self::Params<A>
fn params_mut(&mut self) -> &mut Self::Params<A>
returns a mutable reference to the network parameters
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.