Do you want to learn the basics of deep learning? If the answer is yes, congratulations! You are in the right place. Here I will discuss all the basic details of deep learning. By the end of this article, your deep learning basics will be reviewed. So read the whole article.
Let's get started!
Hello and welcome!
Let's start with the definition of deep learning
What is deep learning
Deep learning (DL) is a subfield of machine learning (ML), and machine learning is a subfield of artificial intelligence (AI). The main goal of DL is to imitate humans.
In simple words, DL tries to think the same way humans think.
DL is a machine learning technique that learns features directly from data. This data can be images, text, videos or audio.
DL can classify images into different categories. I will discuss this in detail in the next section.
DL can work on structured as well as unstructured data.
If you want to learn the definition of DL in detail, then you should definitely read this article – What is DL and why is it popular?
Now let's see why we need to use DL.
Why deep learning
The main reason for using deep learning is the size of the data. This means that DL gives excellent results if you have a large dataset.
The more data you have, the better the result.
This feature makes DL very popular.
Another reason for using deep learning is automatic feature extraction. This means you do not need to feed in all the features manually. DL extracts all the features automatically.
The next reason for using DL is the complexity of the problem. DL can easily handle complex real-world problems.
So these are three main reasons why DL is so popular.
Now let's see how DL works.
How does deep learning work?
DL uses an Artificial Neural Network. An artificial neural network is quite similar to the human brain.
The human brain is made of neurons. These neurons are connected to each other. In the human brain, neurons look something like this …

As you can see in this picture, there are the Neuron, the Dendrites and the axon.
Have you ever wondered?
When you touch a hot surface, how do you pull your hand away suddenly?
This is the process that happens inside you.
When you touch a hot surface, your skin automatically sends a signal to the neurons. Then the neurons make a decision: “remove your hand”.
That is all about the human brain.
The artificial neural network
An artificial neural network works in the same way.
In an artificial neural network there are also neurons, which work in the same way.
An artificial neural network consists of three layers:
Input Layer.
Hidden Layer.
Output Layer.

Let's look at this picture:
Here, all the circles you see are neurons. The artificial neural network is fully connected through these neurons.
The data is passed to the input layer. The input layer then passes this data to the next layer, which is the hidden layer. The hidden layer performs certain operations and passes the result to the output layer.
So this is the basic, raw working procedure of an artificial neural network.
But,
Various calculations are performed in these three layers.
Let's look at them briefly.
One neuron is connected to the others through synapses. Synapses are the lines that connect two neurons.
Each synapse has some associated weights. Let's understand this with the help of this picture.

The activation function
So, using these weights, two operations are performed.
Weighted Sum.
Activation Function.
The first step is the weighted sum. All the weights are multiplied by the input values. The input values are the data you pass to the input layer.
The weighted sum looks something like this …
[ x1.w1+x2.w2+x3.w3+………………..Xn.Wn]
After the weighted sum is computed, the activation function is applied. The neurons then decide whether to send this value to the next layer or not.
The activation function plays an important role. It generates outputs based on the input signals.
The activation function is applied in the hidden layer and the output layer.
The most common and widely used activation functions are:
Threshold Activation Function.
Sigmoid Function.
Rectifier Function.
Hyperbolic Tangent(tan h)
Linear Function.
After the activation function is applied, the output is produced.
Gradient descent
This output is the Predicted output. So we compare this predicted output with the actual output, and check the difference between the two outputs: the predicted output and the actual output.
The difference between these two outputs is known as the error (cost) function, the Cost Function.
The formula for computing the cost function is:
cost function= 1/2 square(y – y^)
where y is the actual output, and y^ is the predicted output.
Our goal is to minimize the cost function.
So, once the neural network computes the cost function, it backpropagates to update the weights. You can understand this with the help of this picture.
So the neural network updates the weights, and the neural network predicts the output again. This predicted output is compared with the actual output.
This process continues until the cost function is minimized.
So the question that comes to your mind is: how do you minimize the cost function?
The answer is with the help of the Gradient Descent method.
The goal of gradient descent is to minimize the cost function.
But,
In gradient descent, the cost function must be convex.
But what then?
What if your cost function is not convex?
Then Stochastic Gradient Descent is used.
So that is all about how DL works.
I hope you now have a basic knowledge of how DL works.
Post links
- Source: Deep Learning


Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.