[][src]Struct mli::Chain

pub struct Chain<T, U>(pub T, pub U);

Trait Implementations

impl<T, U> Forward for Chain<T, U> where
    T: Forward,
    U: Forward<Input = T::Output>, 
[src]

type Input = T::Input

type Internal = (T::Internal, T::Output, U::Internal)

type Output = U::Output

fn run(&self, input: &Self::Input) -> Self::Output[src]

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. Read more

impl<T, U, O> Backward for Chain<T, U> where
    T: Backward<OutputDelta = U::InputDelta> + Forward<Output = O>,
    U: Backward + Forward<Input = O>, 
[src]

type OutputDelta = U::OutputDelta

type InputDelta = T::InputDelta

type TrainDelta = (T::TrainDelta, U::TrainDelta)

fn backward_input(
    &self,
    input: &Self::Input,
    internal: &Self::Internal,
    output_delta: &Self::OutputDelta
) -> Self::InputDelta
[src]

See Backward::backward for documentation.

fn backward_train(
    &self,
    input: &Self::Input,
    internal: &Self::Internal,
    output_delta: &Self::OutputDelta
) -> Self::TrainDelta
[src]

See Backward::backward for documentation.

impl<T, U, O> Train for Chain<T, U> where
    T: Train + Backward<OutputDelta = U::InputDelta> + Forward<Output = O>,
    U: Train + Backward + Forward<Input = O>, 
[src]

fn propogate(
    &mut self,
    input: &Self::Input,
    internal: &Self::Internal,
    output_delta: &Self::OutputDelta
) -> Self::InputDelta
[src]

propogate should have the same effect as running backwards followed by train. Read more

impl<T: Debug, U: Debug> Debug for Chain<T, U>[src]

impl<T: Clone, U: Clone> Clone for Chain<T, U>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, U> Unpin for Chain<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> Sync for Chain<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Send for Chain<T, U> where
    T: Send,
    U: Send

Blanket Implementations

impl<T> Graph for T where
    T: Train
[src]

fn chain<U>(self, other: U) -> Chain<Self, U>[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]