Crates.io | zenu-layer |
lib.rs | zenu-layer |
version | 0.1.1 |
source | src |
created_at | 2024-04-01 09:46:36.781145 |
updated_at | 2024-11-14 10:40:00.446714 |
description | A simple neural network layer library. |
homepage | |
repository | https://github.com/bokutotu/zenu |
max_upload_size | |
id | 1192366 |
size | 47,959 |
ZeNu Layer is a collection of neural network layers implemented in Rust. It provides building blocks for constructing neural networks and integrates with the ZeNu deep learning library.
To use ZeNu Layer in your Rust project, add the following to your Cargo.toml
file:
[dependencies]
zenu-layer = "0.1.0"
Here's a simple example of using a linear layer from ZeNu Layer:
use zenu_autograd::creator::from_vec::from_vec;
use zenu_layer::layers::linear::Linear;
use zenu_layer::Layer;
fn main() {
// Create a new linear layer with input dimension 3 and output dimension 2
let mut linear_layer = Linear::new(3, 2);
// Initialize the layer parameters with a random seed
linear_layer.init_parameters(Some(42));
// Create input data as a Variable
let input = from_vec(vec![1., 2., 3.], [1, 3]);
// Perform a forward pass through the layer
let output = linear_layer.call(input);
// Access the layer parameters
let parameters = linear_layer.parameters();
}
For more details and examples, please refer to the documentation.
ZeNu Layer is licensed under the MIT License.