[−][src]Struct artha::NeuralNetwork
A dead simple Neural Network
Methods
impl NeuralNetwork
[src]
pub fn new(
input_size: usize,
output_size: usize,
hidden_sizes: Vec<usize>
) -> Self
[src]
input_size: usize,
output_size: usize,
hidden_sizes: Vec<usize>
) -> Self
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]
&mut self,
xs: &Matrix<f64>,
ys: &Matrix<f64>,
n: usize
) -> Matrix<f64>
Train the network with the given input, output n number of times
Trait Implementations
Auto Trait Implementations
impl Send for NeuralNetwork
impl Sync for NeuralNetwork
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,