A naive neural network implementation from scratch in Rust for fun. Also includes a roughly equivalent Python implementation for testing purposes.
You can see an example of fitting a dense/linear NN to a sine wave in the main.rs file.
// Create a NN
let mut model = Sequential::new(MSE {});
model.add(Dense::new(2, 3));
model.add(ReLU::new());
model.add(Dense::new(3, 1));
// Predict
let pred = model.forward(&x);
// Backprop
let error = model.loss_fn.loss_prime(&pred, &y);
model.backward(&error, learning_rate);