Struct juggernaut::nn::NeuralNetwork [] [src]

pub struct NeuralNetwork { /* fields omitted */ }

Represents a Neural Network with layers, inputs and outputs

Methods

impl NeuralNetwork
[src]

To add a callback function and receive the errors of the network during training process Please note that there is another function that basically calcualtes the error value

To add a callback function to get called after each epoch

To add a new layer to the network

Example:

use juggernaut::sample::Sample;
use juggernaut::nl::NeuralLayer;
use juggernaut::nn::NeuralNetwork;
use juggernaut::activation::Activation;
use juggernaut::activation::Sigmoid;

let mut test = NeuralNetwork::new();

// 1st layer = 4 neurons - 2 inputs
let nl1 = NeuralLayer::new(4, 2, Sigmoid::new());

test.add_layer(nl1);

To get the layers of the network

This is the forward method of the network which calculates the random weights and multiplies the inputs of given samples to the weights matrix. Thinks.

Use this function to evaluate a trained neural network

This function simply passes the given sample to the forward function and returns the output of last layer