Giter Club home page Giter Club logo

multilayer-perceptron's Introduction

multilayer-perceptron

In this project, I implemented a multilayer perceptron entirely from scratch with the only non-standard dependency being a matrix library I also created. I started by creating a simple one-layer perceptron that could differentiate between the digits '0' and '1'. After achieving that, I decided to try and classify all digits from '0' to '9', which required a neural network capable of non-linear classification and the multilayer perceptron was the natural choice. The implementation involved one input layer, one output layer, and an arbitrary number of hidden layers in-between.

To train my MLP to classify handwritten digits, I used the MNIST dataset, which contains 60,000 training images and 10,000 testing images of handwritten digits. Each image was a 28x28 grayscale image with each pixel represented by a value between 0 and 255. To preprocess the data, I normalized the pixel values to be between 0 and 1 and flattened the images into 1D arrays.

The only issue is with training time. Since I used a form of stochastic gradient descent the weights were updated after each training example, this made it hard to parallelize and so I had the network training on a single core. Ideally, when using large datasets I should have implemented a type of batch gradient descent which would have allowed me to train the network in parallel and would have significantly reduced the amount of time it took to train.

Throughout the project, I gained a deeper understanding of neural network and machine learning fundamentals, such as forward and back propagation, loss/cost functions, and gradient descent. I also gained a better understanding of the calculus underlying gradient descent, especially the chain rule. Overall, the project allowed me to consolidate my knowledge of these concepts and apply them to a real-world problem.

This repo is just the stand-alone multilayer perceptron, to see the full-stack web-app that utilizes my trained multilayer perceptron, and was built (mostly) from scratch, check out my github page.

multilayer-perceptron's People

Contributors

jasonsd19 avatar

Stargazers

 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.