Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 801 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 801 Bytes

LeNet-5 with MNIST

This example demonstrates how to train the LeNet-5 network against the MNIST digit classification dataset.

The LeNet network is instantiated from the ImageClassificationModels library of standard models, and applied to an instance of the MNIST dataset. A custom training loop is defined, and the training and test losses and accuracies for each epoch are shown during training.

Setup

To begin, you'll need the latest version of Swift for TensorFlow installed. Make sure you've added the correct version of swift to your path.

To train the model, run:

cd swift-models
swift run -c release LeNet-MNIST