Struct ritenn::Trainer[][src]

pub struct Trainer<'a, 'b> { /* fields omitted */ }

Used to specify options that dictate how a network will be trained

Implementations

impl<'a, 'b> Trainer<'a, 'b>[src]

Trainer is used to chain together options that specify how to train a network. All of the options are optional because the Trainer struct has default values built in for each option. The go() method must be called however or the network will not be trained.

pub fn rate(&mut self, rate: f64) -> &mut Trainer<'a, 'b>[src]

Specifies the learning rate to be used when training (default is 0.3) This is the step size that is used in the backpropagation algorithm.

pub fn lambda(&mut self, lambda: f64) -> &mut Trainer<'a, 'b>[src]

Specifies the lambda factor for L2 regularization used when training (default is 0.0)

pub fn momentum(&mut self, momentum: f64) -> &mut Trainer<'a, 'b>[src]

Specifies the momentum to be used when training (default is 0.0)

pub fn log_interval(
    &mut self,
    log_interval: Option<u32>
) -> &mut Trainer<'a, 'b>
[src]

Specifies how often (measured in batches) to log the current error rate (mean squared error) during training. Some(x) means log after every x batches and None means never log

pub fn halt_condition(
    &mut self,
    halt_condition: HaltCondition
) -> &mut Trainer<'a, 'b>
[src]

Specifies when to stop training. Epochs(x) will stop the training after x epochs (one epoch is one loop through all of the training examples) while MSE(e) will stop the training when the error rate is at or below e. Timer(d) will halt after the duration d has elapsed.

pub fn learning_mode(
    &mut self,
    learning_mode: LearningMode
) -> &mut Trainer<'a, 'b>
[src]

Specifies what mode to train the network in. Incremental means update the weights in the network after every example.

pub fn go(&mut self) -> f64[src]

When go is called, the network will begin training based on the options specified. If go does not get called, the network will not get trained!

Trait Implementations

impl<'a, 'b> Debug for Trainer<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> RefUnwindSafe for Trainer<'a, 'b>

impl<'a, 'b> Send for Trainer<'a, 'b>

impl<'a, 'b> Sync for Trainer<'a, 'b>

impl<'a, 'b> Unpin for Trainer<'a, 'b>

impl<'a, 'b> !UnwindSafe for Trainer<'a, 'b>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,