Skip to content

ayukmr/nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NN

Simple deep learning library in Rust.

Create a network by defining layers:

let mut network = Network::new(vec![
    Layer::new(256, 128, Activation::SIGMOID),
    Layer::new(128, 64,  Activation::SIGMOID),
    Layer::new(64,  10,  Activation::SOFTMAX),
]);

Train the network using backprop:

for _ in 0..1000 {
    for (label, input) in &train {
        network.backprop(input, label);
    }
}

Test the network using forward:

let (_, input) = &test[0];
let out = network.forward(input);

Evaluate the network using loss:

let (label, input) = &test[0];
let loss = network.loss(input, label);

About

Simple deep learning library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages