only-brain 0.1.4

A simple Neural Network library, without the learning part.
Documentation
// use nalgebra::{DVector, dvector};
// use crate::activation_functions::ActivationFunction;
// use crate::layer::Layer;
// use crate::NeuralNetwork;
//
// struct LayerBuilder {
//     neurons: usize,
//     weights: Option<DVector<f64>>,
//     biases: Option<DVector<f64>>,
//     random: bool,
// }
//
// pub struct NeuralNetworkBuilder {
//     input_layer: usize,
//     output_layer: usize,
//     hidden_layers: Vec<LayerBuilder>,
//     activation_function: Option<ActivationFunction>,
// }
//
// impl NeuralNetworkBuilder {
//     pub fn new(input_layer: usize, output_layer: usize) -> Self {
//         Self {
//             input_layer,
//             output_layer,
//             hidden_layers: Vec::new(),
//             activation_function: None,
//         }
//     }
//
//     pub fn add_layer_random(&mut self, neurons: usize) -> &mut Self {
//         self.hidden_layers.push(LayerBuilder::new(neurons));
//         self
//     }
//
//     pub fn add_layer_with_weights(&mut self, neurons: usize, weights: DVector<f64>) -> &mut Self {
//         if weights.len() != neurons {
//             panic!("Incompatible weights vector size");
//         }
//         self.hidden_layers.push(weights);
//         self
//     }
//
//     pub fn with_activation_function(&mut self, activation_function: ActivationFunction) -> &mut Self {
//         self.activation_function = Some(activation_function);
//         self
//     }
// }
//
// impl LayerBuilder {
//     pub fn new(neurons: usize) -> Self {
//         Self {
//             neurons,
//             weights: None,
//             biases: None,
//             random: true,
//         }
//     }
//
//     pub fn with_weights(mut self, weights: DVector<f64>) -> Self {
//         if weights.len() != self.neurons {
//             panic!("Incompatible weights vector size");
//         }
//         self.weights = Some(weights);
//         self.random = false;
//         self
//     }
//
//     pub fn with_biases(mut self, biases: DVector<f64>) -> Self {
//         if biases.len() != self.neurons {
//             panic!("Incompatible biases vector size");
//         }
//         self.biases = Some(biases);
//         self.random = false;
//         self
//     }
// }