1 unstable release
0.1.0 | Apr 25, 2020 |
---|
#659 in Machine learning
41KB
932 lines
Easyneural
Documentation
This crate let's you build and train the neural network easily.
For now, just a quick example...
fn main() {
const POPULATION_SIZE: usize = 10;
const SIMULATION_ROUNDS: usize = 1;
let neurons_per_layer = [2, 4, 5, 1];
let mut randomizer = DefaultRandomizer::new();
if_chain! {
if let Ok(mut session) = Simulation::<MyWorld>::new(POPULATION_SIZE, &neurons_per_layer, &mut randomizer, None);
if let Ok(parents) = session.run(Finish::Occurences(SIMULATION_ROUNDS));
then {
// I have the trained network!
}
}
}
...and a movie of a car that learned on its own how to avoid cows :)
Dependencies
~2–3MB
~60K SLoC