Crates.io | zenu-optimizer |
lib.rs | zenu-optimizer |
version | 0.1.1 |
source | src |
created_at | 2024-04-01 09:46:48.644882 |
updated_at | 2024-11-14 10:41:40.621218 |
description | A simple optimizer for neural networks |
homepage | |
repository | https://github.com/bokutotu/zenu |
max_upload_size | |
id | 1192367 |
size | 17,905 |
ZeNu Optimizer is a collection of optimization algorithms for training neural networks. It provides various optimizers that can be used with the ZeNu deep learning library.
To use ZeNu Optimizer in your Rust project, add the following to your Cargo.toml
file:
[dependencies]
zenu-optimizer = "0.1.0"
Here's a simple example of using the SGD optimizer from ZeNu Optimizer:
use zenu_autograd::{creator::from_vec::from_vec, Variable};
use zenu_optimizer::sgd::SGD;
fn main() {
let variable = from_vec(vec![1., 2., 3., 4., 5., 6.], [3, 2]);
variable.set_grad(from_vec(vec![1., 2., 3., 4., 5., 6.], [3, 2]));
let sgd = SGD::new(0.01);
sgd.update(&[variable.clone()]);
// The variable has been updated by the optimizer
// Perform further computations with the updated variable
}
For more details and examples, please refer to the documentation.
ZeNu Optimizer is licensed under the MIT License.