only_brain/lib.rs
1
2//! # No Brain
3//!
4//! A very simple Neural Network library built in Rust with the objective to allow
5//! the user to create, manipulate and train a neural network directly. The user has
6//! direct access to weights and biases of the network, allowing him to implement
7//! his own training methods.
8//!
9//! # Example
10//!
11//! ```
12//! use no_brain::NeuralNetwork;
13//! use nalgebra::dmatrix;
14//! use nalgebra::dvector;
15//!
16//! fn main() {
17//! let mut nn = NeuralNetwork::new(&vec![2, 2, 1]);
18//!
19//! nn.set_layer_weights(1, dmatrix![0.1, 0.2;
20//! 0.3, 0.4]);
21//! nn.set_layer_biases(1, dvector![0.1, 0.2]);
22//!
23//! nn.set_layer_weights(2, dmatrix![0.9, 0.8]);
24//! nn.set_layer_biases(2, dvector![0.1]);
25//!
26//! let input = vec![0.5, 0.2];
27//! let output = nn.feed_forward(&input);
28//!
29//! println!("{:?}", output);
30//! }
31//! ```
32mod neural_network;
33mod layer;
34mod activation_functions;
35
36mod io;
37mod neural_network_builder;
38
39pub use io::*;
40pub use neural_network::*;