Crates.io | zenu-autograd |
lib.rs | zenu-autograd |
version | 0.1.2 |
source | src |
created_at | 2024-03-02 13:00:34.660342 |
updated_at | 2024-11-14 10:34:48.986877 |
description | A simple autograd library for learning purposes |
homepage | |
repository | https://github.com/bokutotu/zenu |
max_upload_size | |
id | 1159697 |
size | 223,975 |
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.
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.
ZeNu Autograd is licensed under the MIT License.