Skip to content

An example of hand written digits recognition app using Apple MLX and other Apple frameworks.

License

Notifications You must be signed in to change notification settings

iliasaz/mlx-swift-mnist

Repository files navigation

MNIST training example using MLX, TabularData, Charts, and SwiftUI.

This is an example application demonstrating the use of Apple MLX (Swift), TabularData, Swift Charts, and SwiftUI frameworks for creating a modular ML training app. The app trains a neural network of choice ( MLP or LeNet) on MNIST data set - hand written digits recognition.

The app has teh following featues:

  • Loading the training data from a CSV file,
  • Training a model (MLP or LeNet),
  • Running predictions,
  • Visualizing the activations of the model layers.

The code is structured so that one can easily adjust the model architecture or add your own model. Layer visualizations are implemented as extensions to the layer classes and can be easily modified to suite your visualization preferences.

Similar works

The application runs best on MacOS 15+ and Apple Silicon CPU/GPU.

The moduler design allows us to modify the models independently from data processing and training pipelines. One can create their own neural network model and easily plug it into the app.

New in v.1.2

  • Saving and loading a trained model using safetensors format
  • Digit recognition from a hand drawn image
  • Continuous model training with reporting of the current losses and accuracy
  • Layer visualizations

Screenshots Screenshots

About

An example of hand written digits recognition app using Apple MLX and other Apple frameworks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages