Trait gad::net_ext::DiffNet[][src]

pub trait DiffNet<T>: Net<Graph1, Output = Value<T>> where
    T: Number,
    Self::Weights: WeightOps<T>, 
{ fn apply_gradient_step(
        &mut self,
        lambda: T,
        batch: Vec<Self::Input>
    ) -> Result<T> { ... } }

Extension trait when the algebra is crate::Graph1 and the output is a scalar.

Provided methods

fn apply_gradient_step(
    &mut self,
    lambda: T,
    batch: Vec<Self::Input>
) -> Result<T>
[src]

Apply a “mini-batch” gradient step.

  • Self::Output = Value<T> is a scalar value representing the error.
  • lambda is expected to be negative for loss minimization.
Loading content...

Implementors

impl<N, T> DiffNet<T> for N where
    T: Number,
    N: Net<Graph1, Output = Value<T>>,
    N::Weights: WeightOps<T>, 
[src]

Loading content...