pub struct BackProp {
pub parameters: LearningParameters,
pub hidden_derivative: fn(f64) -> f64,
pub output_derivative: fn(f64) -> f64,
/* private fields */
}
Fields§
§parameters: LearningParameters
§output_derivative: fn(f64) -> f64
Implementations§
Source§impl BackProp
impl BackProp
pub fn new( input_count: usize, hidden_counts: &[usize], output_count: usize, learning_rate: f64, momentum: f64, weight_decay: f64, hidden_activation: fn(f64) -> f64, hidden_derivative: fn(f64) -> f64, output_activation: fn(f64) -> f64, output_derivative: fn(f64) -> f64, ) -> Self
pub fn pulse(&mut self, input: &[f64]) -> Vec<f64>
pub fn back_prop(&mut self, target: &[f64])
pub fn test(&mut self, input: &[f64], target: &[f64]) -> f64
pub fn train( &mut self, min_error: f64, max_epochs: Option<u64>, max_duration: Option<Duration>, train_inputs: &[&[f64]], train_targets: &[&[f64]], test_inputs: &[&[f64]], test_targets: &[&[f64]], ) -> TrainingResult
pub fn save<T: CopyIO>(&self, f: &mut T) -> Result<()>
pub fn load<T: CopyIO>( f: &mut T, hidden_activation: fn(f64) -> f64, hidden_derivative: fn(f64) -> f64, output_activation: fn(f64) -> f64, output_derivative: fn(f64) -> f64, ) -> Result<Self>
Trait Implementations§
impl StructuralPartialEq for BackProp
Auto Trait Implementations§
impl Freeze for BackProp
impl RefUnwindSafe for BackProp
impl Send for BackProp
impl Sync for BackProp
impl Unpin for BackProp
impl UnwindSafe for BackProp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more