Struct ritenn::NN [−][src]
Neural network
Implementations
impl NN
[src]
pub fn new(
layers_sizes: &[u32],
hidden_activation: Activation,
output_activation: Activation
) -> NN
[src]
layers_sizes: &[u32],
hidden_activation: Activation,
output_activation: Activation
) -> NN
Each number in the layers_sizes
parameter specifies a
layer in the network. The number itself is the number of nodes in that
layer. The first number is the input layer, the last
number is the output layer, and all numbers between the first and
last are hidden layers. There must be at least two layers in the network.
The activation function can be Sigmoid, SELU, PELU, LRELU, Linear or Tanh.
Important: Take care of inputs/outputs for the individual activation functions!
Do not use linear activation for hidden layers.
pub fn run(&self, inputs: &[f64]) -> Vec<f64>
[src]
Runs the network on an input and returns a vector of the results.
The number of f64
s in the input must be the same
as the number of input nodes in the network. The length of the results
vector will be the number of nodes in the output layer of the network.
pub fn train<'b>(
&'b mut self,
examples: &'b [(Vec<f64>, Vec<f64>)]
) -> Trainer<'_, '_>
[src]
&'b mut self,
examples: &'b [(Vec<f64>, Vec<f64>)]
) -> Trainer<'_, '_>
Takes in vector of examples and returns a Trainer
struct that is used
to specify options that dictate how the training should proceed.
No actual training will occur until the go()
method on the
Trainer
struct is called.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,