Giter Site home page Giter Site logo

neuralnet-mnist's Introduction

Banner

NeuralNet-MNIST

An MNIST handwriting training example for the NeuralNet package.

This application is part of the Swift AI project. Full details on the project can be found in the main repo.

Installation

  1. Clone the repository:
git clone https://github.com/Swift-AI/NeuralNet-MNIST.git
  1. Generate Xcode project:
swift package generate-xcodeproj

Training

Setup

This project comes packaged with training data and a pre-built routine. The only thing you need to do is edit the following lines at the top of main.swift:

// Path to MNIST dataset directory.
let mnistDataDir = "/PATH/TO/NeuralNet-MNIST/MNIST"

// Full filepath for trained network output file.
let outputFilepath = "/PATH/TO/neuralnet-mnist-trained"

You should set mnistDataDir to the absolute path of the training data directory (included in this repository). This is necessary because Swift Package Manager currently doesn't support app bundles.

outputFilepath will be the location that the final, trained network is stored. You may set it to whatever you like.

Run

Once these paths are set, just hit run and watch!

Always run the trainer in release mode! or it will be a long day :)

Customization

You can customize a number of parameters in the trainer and and neural network. The NeuralNet package contains more information on how to construct a neural net, so we won't go into detail here.

See the information at the top of main.swift for more inspiration. ย 

Data

The MNIST dataset is used for training. This includes 70,000 handwriting samples of the digits 0-9.

neuralnet-mnist's People

Contributors

morpheby avatar collinhundley avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.