[][src]Struct artha::NeuralNetwork

pub struct NeuralNetwork { /* fields omitted */ }

A dead simple Neural Network

Methods

impl NeuralNetwork[src]

pub fn new(
    input_size: usize,
    output_size: usize,
    hidden_sizes: Vec<usize>
) -> Self
[src]

creates a new neural network with given input, output, and hidden sizes

pub fn forward(&mut self, xs: &Matrix<f64>) -> Matrix<f64>[src]

Forward porpagation through the network

pub fn backward(&mut self, xs: Matrix<f64>, ys: Matrix<f64>, o: Matrix<f64>)[src]

Backward porpagation through the network

pub fn train(
    &mut self,
    xs: &Matrix<f64>,
    ys: &Matrix<f64>,
    n: usize
) -> Matrix<f64>
[src]

Train the network with the given input, output n number of times

Trait Implementations

impl Debug for NeuralNetwork[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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<T> Any for T where
    T: 'static + ?Sized
[src]