Expand description
A library for creating, using, and modifying artificial neural networks using the Common
Genetic Encoding (CGE). See const_cge for a similar library geared towards embedded
environments and performance-critical use cases. For the creation of CGE-compatible neural
networks, see the eant2 library.
§Quick Start
To load and use an existing neural network from a file:
use cge::{Network, WithRecurrentState};
// `extra` is any user-defined data stored alongside the network
let (mut network, metadata, extra) =
Network::<f64>::load_file::<(), _>("network.cge", WithRecurrentState(true)).unwrap();
println!("description: {:?}", metadata.description);
println!("num inputs, outputs: {}, {}", network.num_inputs(), network.num_outputs());
println!("{:?}", network.evaluate(&[1.0, 2.0]).unwrap());
network.clear_state();
println!("{:?}", network.evaluate(&[2.0, 0.0]).unwrap());See Network for full documentation.
Re-exports§
pub use self::activation::Activation;pub use self::encoding::WithRecurrentState;pub use self::network::Network;
Modules§
- activation
- Handling of neuron activation functions.
- encoding
- A portable encoding for
cgeNetworks. SeePortableCGE. - gene
- Different types of genes that can be used in a
Networkgenome. - network
- The main neural network type. See
Networkfor full documentation.