Understanding Deep Learning

Original Source Here

How does it works?

After we know about deep learning, the next thing is trying to understand how deep learning works. First, we are going to take a look at neural network example.

An example of Neural Network

The neural network consist of three parts, Input Layer, Hidden Layers, and Output Layer. Each of this layers has a nodes called Neurons and a Channels that is connecting through each layer. Each of these channel has a value or weight that could make certain neuron move to another neuron on the next layer. To get these weight, it is different throughout the layer. Weight from the input layer to the first hidden layer, symbolized by Wmr in the picture, is achieved through the weighted sum of the total input. Weight throughout the hidden layers, symbolized by Wrk in the picture, is a bias value that could change the Wmr so that we could get the output that we wanted. Lastly, the weight from the last hidden layer to the output layer, symbolized by Wkn in the picture, is achieved through an activation function that takes the sum of weighted total input and bias as it’s input. The result of these activation function determines the specific output neuron that is activated. In mathematical formula, it could be represented like this.

σ is a sigmoid function, a function that is often used as an activation function because the result of the function has a range between 0 and 1. These result could then determines if the output of the certain neuron get’s activated.

Sigmoid Function

Most of neural network will flow in one direction, only from input to output. However we can also train the model with a Backpropagation, move in the opposite direction, to calculate the error that is associated with each neuron so it allows adjusting the algorithm appropriately.

To understand better of how deep learning works, let’s use an example. We’re going to use a neural network model that detect a number, based on handwritten input, as an example.

Neural Network of Number Detection

As you can see on the picture above, we’re trying to detect the number “9”. We could easily know that all of the three picture on the left is a 9, but how does a machine will detect this?

First, we assume that this picture is represented in pixels, in this case let’s say that it’s a 28×28 px of picture of a handwritten “9”. Then, we will have a 784 pixel which will consist of the color black or white. These 784 pixels are then made as an input and the collections of the pixels in certain coordinate could then activate neurons on the hidden layers. Even though the handwritten number of “9” could be different, the machine could deduct that the number “9” will consist of a circle on the top part and a straight line at the bottom part. Thus, that’s how the machine will generate a 9 as an output. This would also apply to the other numbers. For example, when we try to use the number “4” as the input, the third and last neurons on the last hidden layer will then activate the output of 4.


Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: