Crates.io | syron |
lib.rs | syron |
version | 0.1.1 |
source | src |
created_at | 2022-03-04 04:57:40.457778 |
updated_at | 2022-03-04 05:03:27.854642 |
description | Syron is a Rust library for building, training and running basic neural networks |
homepage | https://github.com/vs-123/syron |
repository | https://github.com/vs-123/syron |
max_upload_size | |
id | 543350 |
size | 6,697 |
syron is a Rust library designed to make simple neural networks with ease.
use syron::nn::{Network, Activation};
fn main() {
// XOR Problem
let x = ndarray::arr2(&[[0.0, 0.0], [0.0, 1.0], [1.0, 0.0], [1.0, 1.0]]);
let y = ndarray::arr2(&[[0.0], [1.0], [1.0], [0.0]]);
// Create a network with 2 inputs and 3 hidden layers
let mut nn = Network::new(2, 3, Activation::Sigmoid);
nn.train(x, y, 1000);
println!("{:?}", nn.predict(ndarray::arr2(&[[0.0, 0.0]])));
}