runnt (rust neural net)
Very simple fully connected neural network.
For when you just want to throw something together with minimal dependencies, and a few lines of code.
Created this since I struggled to find an nice rust library which didn't have external dependencies, and was easy to use.
You are welcome to raise an issue or PR if you identify any errors or optimisations.
Functionality:
- fully connected neural network
- minimal dependencies
- no external static libraries/dlls required
- able to define layers sizes
- able to define activation types
- can save/load model
- Stochastic, mini batch, gradient descent
- Dataset manager
- csv
- onehot encoding
- normalization
How to use
Simple example
//XOR
use ;
let inputs = ;
let outputs = ;
let mut nn = NNnew
.with_learning_rate
.with_hidden_type
.with_output_type;
for i in 0..5000
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
With Dataset and runner:
let set = builder
.read_csv
.allocate_to_test_data
.add_input_columns
.add_input_columns
.add_target_columns
.build;
let save_path = r"network.txt";
let mut net = if from_str.unwrap.exists else ;
//run for 1000 epochs, with batch size 32 and report mse every 10 epochs
run_and_report;
net.save;