Struct scarecrow::sgd::SGDTrainer
[−]
[src]
pub struct SGDTrainer { pub rate: f32, pub epochs: usize, pub loss: Box<DifferentiableLossFunction>, }
Stochastic gradient descent trainer.
Fields
rate: f32
The learning rate
epochs: usize
The number of iterations to train
loss: Box<DifferentiableLossFunction>
The loss function to use
Methods
impl SGDTrainer
[src]
fn new(epochs: usize, rate: f32) -> SGDTrainer
Trait Implementations
impl SupervisedTrainer for SGDTrainer
[src]
fn train(
&self,
layers: &mut LinkedList<Box<WeightedLayer>>,
inputs: &[f32],
targets: &[f32]
)
&self,
layers: &mut LinkedList<Box<WeightedLayer>>,
inputs: &[f32],
targets: &[f32]
)