Skip to content

rawhuul/mnist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST Neural Network in Rust

This project features a minimal neural network implementation in Rust for classifying handwritten digits from the MNIST dataset. The implementation utilizes only the standard Rust library and fastrand for random number generation.

It is inspired from miniMNIST-c

Features

  • Two-layer neural network architecture (input → hidden → output)
  • ReLU activation function for the hidden layer
  • Softmax activation function for the output layer
  • Cross-entropy loss function
  • Stochastic Gradient Descent (SGD) optimizer

Configuration

You can customize the following parameters in main.rs:

  • HIDDEN_SIZE: Number of neurons in the hidden layer
  • LEARNING_RATE: Learning rate for SGD
  • EPOCHS: Number of training epochs
  • BATCH_SIZE: Size of mini-batches for training
  • TRAIN_SPLIT: Proportion of data allocated for training (the remainder is used for testing)

License

This project is open-source and available under the MIT License.

About

mini MNIST implementation in rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages