1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

//! # No Brain
//!
//! A very simple Neural Network library built in Rust with the objective to allow
//! the user to create, manipulate and train a neural network directly. The user has
//! direct access to weights and biases of the network, allowing him to implement
//! his own training methods.
//!
//! # Example
//!
//! ```
//! use no_brain::NeuralNetwork;
//! use nalgebra::dmatrix;
//! use nalgebra::dvector;
//!
//! fn main() {
//!     let mut nn = NeuralNetwork::new(&vec![2, 2, 1]);
//!
//!     nn.set_layer_weights(1, dmatrix![0.1, 0.2;
//!                                      0.3, 0.4]);
//!     nn.set_layer_biases(1, dvector![0.1, 0.2]);
//!
//!     nn.set_layer_weights(2, dmatrix![0.9, 0.8]);
//!     nn.set_layer_biases(2, dvector![0.1]);
//!
//!     let input = vec![0.5, 0.2];
//!     let output = nn.feed_forward(&input);
//!
//!     println!("{:?}", output);
//! }
//! ```
mod neural_network;
mod layer;
mod activation_functions;

pub use neural_network::*;