Skip to content

mauri870/rust-fann-mnist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RUST FANN MNIST

MNIST trained in rust using the FANN library.

Installation

yay -S fann
# or
# sudo apt install libfann-dev libfann2
git clone https://github.com/mauri870/rust-fann-mnist
cd rust-fann-mnist

Usage

Download the dataset and generate FANN files

First you need to download the mnist dataset, for that run the following commands:

mkdir -p data
NAMES="train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte"
for n in $NAMES; do
    echo "Downloading $n..."
    wget -qO- http://yann.lecun.com/exdb/mnist/$n.gz | gunzip -c > data/$n
done

Next generate the train/test and validation files for FANN:

cargo run --bin preprocess --release

Train

cargo run --bin train --release

Since FANN rely only on cpu computations, you can expect a training time of ~40 minutes on an octa core processor.

Test

cargo run --bin test --release

About

MNIST trained in rust using the fann library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages