NeuralNetwork

Trait NeuralNetwork 

Source
pub trait NeuralNetwork<A>
where Self::Params<A>: RawParams<Elem = 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§

Source

type Config: NetworkConfig<String, A>

The configuration of the neural network defines its architecture and hyperparameters.

Source

type Params<_A>

The parameters of the neural network define its weights and biases.

Required Methods§

Source

fn config(&self) -> &Self::Config

returns a reference to the network configuration;

Source

fn params(&self) -> &Self::Params<A>

returns a reference to the network parameters

Source

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.

Implementors§