Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 743 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 743 Bytes

micrograd.rs

A tiny autograd engine for learning purposes in Rust. Based on the Python version micrograd.

Sample Trained Model

Another Sample Trained Model

Loss vs Epochs

Example usage

let v1 = Value::from(2.0);
let v2 = Value::from(3.0);
let v3 = &v1 + &v2;
let v4 = &v3 * &v1;
let v5 = &v4.pow(2);
v5.back_prop();

assert_eq!(v5.value(), 100.0);
assert_eq!(v1.grad(), 140.0);
assert_eq!(v2.grad(), 40.0);

TODO ✨

  • Create Value struct with computational graph
  • Test on some test data
  • Implement graphing of computational graph

This project is in no way endorsed by the Rust Foundation.