Git Product home page Git Product logo

mlp's Introduction

MLP

This project is a feed-forward neural network written in C++.
It's built completely from scratch, without the help of any 3rd-party library for matrix operations, differentiation operations or linear algebra.

The network achieves the following tesults:

Accuracy on unseen data of 90% on the Fashion MNIST dataset (multi-class classification) in 6 minutes with 8 threads,
config:

OUTPUT_LAYER_SIZE = 10
HIDDEN_LAYERS_NEURON_COUNT = { 128, 128 }
BATCH_SIZE = 200
NORMALIZATION_FACTOR = 255

Accuracy on unseen data of 100% on 16-bit XOR dataset (binary classification) in 3 minutes with 1 thread,
config:

OUTPUT_LAYER_SIZE = 2
HIDDEN_LAYERS_NEURON_COUNT = { 32, 32, 32, 32 }
BATCH_SIZE = 100
NORMALIZATION_FACTOR = 1

All of these datasets are located in the data folder.

Installation

  1. Clone repo
  2. Compile
    • cmake src/
    • make
  3. Extract datasets
    • From data.zip to MLP/data, i.e. MLP/data/fashion_mnist_train_vectors.csv
  4. Run the binary
    • ./main

The program will start working on the Fashion MNIST dataset with the configuration mentioned above. The dataset and configuration can be changed in main.cpp (the hyperparamter constants).

Example output:

image

mlp's People

Contributors

vl-kr avatar

Watchers

 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.