Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goldstraw/rust_cnn
Rust convolutional neural network from scratch
https://github.com/goldstraw/rust_cnn
cnn convolutional-neural-network machine-learning rust
Last synced: about 1 month ago
JSON representation
Rust convolutional neural network from scratch
- Host: GitHub
- URL: https://github.com/goldstraw/rust_cnn
- Owner: goldstraw
- License: agpl-3.0
- Created: 2022-12-09T18:07:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T11:30:09.000Z (5 months ago)
- Last Synced: 2024-11-08T23:03:09.511Z (3 months ago)
- Topics: cnn, convolutional-neural-network, machine-learning, rust
- Language: Rust
- Homepage:
- Size: 13.3 MB
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-list - goldstraw/RustCNN
- awesome-rust-list - goldstraw/RustCNN
README
# Rust Convolutional Neural Network from Scratch
This repository contains a Rust implementation of a Convolutional Neural Network (CNN) built from scratch. This repository provides code for training on the MNIST dataset, and the 50States10K dataset.
All machine learning code is written from scratch, however the `ndarray` crate is used for matrix operations. When tuned correctly, the network should reach 90+% accuracy within one minute on the MNIST dataset.
## Overview
The repository implements the following features:
- Convolutional, max pooling, and fully connected layers
- ReLU and Softmax activation functions
- Cross-entropy loss function
- SGD, Momentum, RMSProp, and Adam optimizers
- Dropout
- He initialization## Usage
To run the demo of the CNN, place the [MNIST dataset](http://yann.lecun.com/exdb/mnist/) in a folder named `data`, and use the following command:
```
$ cargo run --release
```This command will run a demo of the CNN and train it on the MNIST dataset.
## Further Reading
For more information about this project, read [my blog post on CNNs](https://charliegoldstraw.com/articles/cnn/).
## License
This project is licensed under the GNU Affero General Public License v3.0 - see the `LICENSE` file for details.