Struct prophet::learn_config::LearnConfig
[−]
[src]
pub struct LearnConfig { pub act_fn: ActivationFn<f32>, // some fields omitted }
Represents a configuration that directly controls the parameters of learning for a neural net.
A system that tries to optimize the way a neural net learns over the duration of a training session could make a good use of this structure as an interface to the underlying parameters.
Fields
act_fn: ActivationFn<f32>
the activation function used during training and predicting
Methods
impl LearnConfig
[src]
fn new(learn_rate: f32, learn_momentum: f32, act_fn: ActivationFn<f32>) -> Self
fn learn_rate(&self) -> f32
Returns the current learn rate.
fn learn_momentum(&self) -> f32
Returns the current learn rate.
fn update_learn_rate(&mut self, new_learn_rate: f32)
Sets the learn rate of this configuration to the given value.
Panics
If the given learn rate is ∉ (0, 1].
fn update_learn_momentum(&mut self, new_learn_momentum: f32)
Sets the learn momentum of this configuration to the given value.
Panics
If the given learn momentum ∉ [0, 1].
Trait Implementations
impl Copy for LearnConfig
[src]
impl Clone for LearnConfig
[src]
fn clone(&self) -> LearnConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more