It’s never been easier to play around with Neural Networks

Neural Networks are all over the place, you can see them in fields like Robotics in Self-Driving-Cars, in Medical assistance with Watson and many others applications. When people talk about it sounds cryptic and really hard. But here's how you can create one yourself.

More...

Neural Networks

Neural Networks are used in Self driving cars. They are seen all over the news today in companies like Tesla, Uber, Google

Build one  yourself

The Steps to Build Your Neural Network

Guide

  • Get your hands on data
  • Create your model
  • Train your network
  • Use in a test dataset
  • Go wild and use it into new data

First we need the data

Let's take the example of the MNIST digit recognition competition. We are supplied with hand written digits and our task is

  • Given a new image of a handwritten digit, tell what the digit is
aaa

Handwritten digits

For this task we're given the handwritten digit with 28x28 pixels, to use this image as a input for our network we need to flatten the vetor to a 784 one line vector, here's an example with a 2x2 matrix 

So now we know that our input digit is going to be 784 long, so we can beggin creating our Neural Network.

Using PyTorch

If you are not familiar with PyTorch, you can check out here, or if you're new to Neural Networks you can start here. It's pretty straight forward. So we need to create a NN ( Neural Network ) with 784 inputs. The outputs and how many layers we can choose, it's simple to add or remove more of them in your model.

Steps

  • Import PyTorch 
  • Create your Model with nn.Sequential
  • Specify how many inputs and outputs it should have on nn.Linear(#inputs,#outputs)
  • Print your model to see the configuration

You can check out the code here, if you want more content like this, I have a YouTube Channel

Welcome to the club!

There you are. You've created your first Neural Network, doesn't feel good ? 


2 MIN READ
>