3 releases

new 0.1.2 Nov 14, 2024
0.1.1 Apr 1, 2024
0.1.0 Mar 2, 2024

#196 in Machine learning

Download history 22/week @ 2024-07-29 14/week @ 2024-08-26 4/week @ 2024-09-16 26/week @ 2024-09-23 7/week @ 2024-09-30 126/week @ 2024-11-11

126 downloads per month
Used in 3 crates

MIT license

760KB
21K SLoC

ZeNu Autograd

ZeNu Autograd is an automatic differentiation library for Rust. It provides the foundation for building and training neural networks by automatically computing gradients of mathematical expressions.

Features

  • Define and manipulate mathematical expressions using Variables
  • Automatically compute gradients through reverse-mode automatic differentiation
  • Support for various mathematical operations and functions
  • Integration with ZeNu deep learning library

Getting Started

To use ZeNu Autograd in your Rust project, add the following to your Cargo.toml file:

[dependencies]
zenu-autograd = "0.1.0"

Here's a simple example of using ZeNu Autograd:

use zenu_autograd::{Variable, creator::from_vec::from_vec};

fn main() {
    let x = from_vec(vec![1., 2., 3., 4., 5., 6.], [3, 2]);
    let y = from_vec(vec![7., 8., 9., 10., 11., 12.], [3, 2]);
    let z = x.clone() * y.clone() + y.clone();

    z.backward();

    let x_grad = x.get_grad().unwrap();
    let y_grad = y.get_grad().unwrap();

    // Perform further computations with the gradients
}

For more details and examples, please refer to the documentation.

License

ZeNu Autograd is licensed under the MIT License.

Dependencies

~1.6–4MB
~73K SLoC