An introduction to Neural Networks - BookBot

In this article, we will discuss what is neural networks and how neural networks work. Last year my friend visited Russia. Even though he does not know to read Russian, he did not have any trouble in figuring his way out. All thanks to Google’s real-time translation of Russian boards into English. This is just one of the several applications of neural networks.
Neural networks form the base of deep learning, a subfield of machine learning where the algorithms are inspired by the structure of the human brain. Neural networks take in data and train themselves to recognize the patterns in this data and then predict the outputs for a new set of similar data.

How Neural Networks Work?

Let’s understand how this is done. Let’s construct a neural network that differentiates between a square, circle, and triangle. Neural networks are made up of layers of neurons. These neurons are the core processing units of the network.

Different Layer of Neural Network


layer of neural network
Source: persagen.com
  • First, we have the input layer which receives the input
  • The output layer predicts our final output
  • In between exist the hidden layers, which perform most of the computations required by our network.
Here’s an image of a circle. This image is composed of 28 by 28 pixels which make up for 784 pixels. Each pixel is fed as input to each neuron of the first layer. Neurons of one layer are connected to neurons of the next layer through channels. Each of these channels is assigned a numerical value known as weight. The inputs are multiplied to the corresponding weights and their sum is sent as input to the neurons in the hidden layer. Each of these neurons is associated with a numerical value called the bias. Which is then added to the input. Sum this value is then passed through a threshold function called the activation function. The result of the activation function determines if the particular neuron will get activated or not an. Activated neuron transmits data to the neurons of the next layer over the channels in this manner.
The data is propagated through the network this is called forward propagation. In the output layer, the neuron with the highest value fires and determines the output. The values are basically probable for example, here are near unassociated with square has the highest probability.
Hence, that’s the output predicted by the neural network. Of course, just by a look at it, we know our neural network has made a wrong prediction. But how does the network figure this out?

Training the Neural Network

Note that our network is yet to be trained. During this training process along with the input our network also has the output fed to it. The predicted output is compared against the actual output to realize the error in prediction.
The magnitude of the error indicates how wrong we are in the sign suggests. If our predicted values are higher or lower than expected. The arrows here give an indication of the direction and magnitude of change to reduce the error. This information is then transferred backward through our network. This is known as backpropagation.
Now based on this information, the weights have adjusted. This cycle of forwarding propagation and back propagation is iteratively performed with multiple inputs? This process continues until our weights are assigned such that the network can predict the shapes correctly. In most of the cases, this brings our training process to an end.
You might wonder how long this training process takes. Honestly, neural networks may take hours or even months to train but time is a reasonable trade-off when compared to its.

Prime Applications of Neural Networks


facial recognition
facial recognition
Let us look at some of the prime applications of neural networks
  • Facial Recognition: – Cameras on smartphones these days can estimate the age of the person based on their facial features. This is neural networks at play first. Differentiating the face from the background and then correlating the lines and spots on your face to a possible age.
  • Forecasting: – Neural networks are trained to understand the patterns and detect the possibility of rainfall and stock prices with high accuracy.
  • Music Composition: – Neural networks can even learn patterns and music and train itself enough to compose a fresh tune.
With deep learning and neural network, we are still taking baby steps. The growth in this field has been foreseen by the big name’s companies such as Google, Amazon, and Nvidia have invested in developing products such as
  • libraries
  • predictive models
  • intuitive GPUs
that support the implementation of neural networks.
The question dividing the visionaries is on the reach of neural networks to what extent can we replicate the human brain? We’d have to wait a few more years to give a definite answer.