pub trait DeepNeuralNetwork<S, T>: Forward<S, Output = T> {
type Input: Forward<S, Output = T>;
type Hidden: Forward<T, Output = T>;
type Out: Forward<T, Output = T>;
const HIDDEN: Option<usize> = None;
// Required methods
fn input(&self) -> &Self::Input;
fn hidden(&self) -> &[Self::Hidden];
fn output(&self) -> &Self::Out;
// Provided methods
fn nlayers(&self) -> usize { ... }
fn nhidden(&self) -> usize { ... }
}Expand description
This trait describes any neural networks or models that adhears to the deep netural network architecture. This design considers a single input and output layer, while allowing for any number of hidden layers to be persisted.
The HIDDEN constant is used to specify the number of hidden layers
and is used to compute the total number of layers (HIDDEN + 2)
Provided Associated Constants§
Required Associated Types§
type Input: Forward<S, Output = T>
type Hidden: Forward<T, Output = T>
type Out: Forward<T, Output = T>
Required Methods§
Provided Methods§
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.