[−][src]Trait mli::Forward
This trait is for algorithms that have an input and produce an output.
Associated Types
Loading content...Required methods
fn forward(&self, input: &Self::Input) -> (Self::Internal, Self::Output)
forward
produces:
- All intermediary values produced, which can be reused in the back propogation step
- The output
f
given aninput
Provided methods
fn run(&self, input: &Self::Input) -> Self::Output
run
only produces the output from the input. The default implementation uses forward
.
You can make a custom implementation of this to avoid the overhead of producing and returning
the internal variables.
Implementors
impl<'a, T> Forward for &'a T where
T: Forward,
[src]
T: Forward,
type Input = T::Input
type Internal = T::Internal
type Output = T::Output
fn forward(&self, input: &Self::Input) -> (Self::Internal, Self::Output)
[src]
fn run(&self, input: &Self::Input) -> Self::Output
[src]
impl<'a, T> Forward for &'a mut T where
T: Forward,
[src]
T: Forward,
type Input = T::Input
type Internal = T::Internal
type Output = T::Output
fn forward(&self, input: &Self::Input) -> (Self::Internal, Self::Output)
[src]
fn run(&self, input: &Self::Input) -> Self::Output
[src]
impl<T, U> Forward for Chain<T, U> where
T: Forward,
U: Forward<Input = T::Output>,
[src]
T: Forward,
U: Forward<Input = T::Output>,