A neural network capable of learning and calculating output.
This project is just made for fun :)
Please go to Inner Workings to read more.
[dependencies]
fksainetwork = "0.1.4"
let layers = [2, 2]; //2 input neurons, 2 output neurons
let activations = [0, 1]; //linear, sigmoid
let mut network = Network::new(&layers, &activations);
//or: let network = load_network(String::from("path/network-file"));
//calculating
let input = [1.0, 1.0];
let output = network.calculate(&input);
println!("{:?}", output);
//learning
let expected = [0.0, 1.0];
network.learn_bpg_mse(0.01, &expected);
//save
save_network(String::from("path/network-file"), &network);
=======
let layers = [2, 2]; //2 input neurons, 2 output neurons
let activations = [0, 1]; //linear, sigmoid
let mut network = Network::new(&layers, &activations);
//or: let network = load_network(String::from("path/network-file"));
//calculating
let input = [1.0, 1.0];
let output = network.calculate(&input);
println!("{:?}", output);
//learning
let expected = [0.0, 1.0];
network.learn_bpg_mse(0.01, &expected);
//save
save_network(String::from("path/network-file"), &network);
0.1.3: Added Tanh Activation Function.
0.1.3: Improved Docs.