Basics of Deep Learning
As the saying goes, the purpose of life is to understand deep learning, or something along those lines...
Deep Learning
What is machine learning?
As a kid, I was always fascinated by machine learning and AI! But what is it,
really?
In simple words, machine learning is the process of training a machine with a
particular input to give a particular output.
It can be used for lots of different purposes like building virtual
assistants, open domain chatbots, face recognition, spam filtering and many
more!
What is deep learning?
Frankly speaking, there is no clear line of difference between machine
learning and deep learning.
Deep learning is a branch of ML that uses neural networks to generate
output. It is also mostly supervised.
What's the difference between machine learning and deep learning?
The best way to understand this is with the help of an example.
Let's say you buy a new car and you teach an ML model to turn the radio on
when you say the word "radio". Now the model will analyse sentences spoken
by you and look for the word "radio". If it finds it, then it turns on the
radio.
Now in the same context, let's say you say something like, "I'm really
bored" or "I wanna hear some
music". This time, the ML model doesn't do anything as you're not using the
word "radio".
This is where Deep Learning kicks in!
Using internal libraries and through extensive training, the deep learning
model understands that you would like to listen to some music and turns on
the radio. Easy, right?
The whole purpose of writing this blog was for readers to understand the
most fundamental concepts of deep learning. So let's dive right into
it, shall we?
What is a neural network?
A neural network is a network that consists of thousands or even millions of
deeply interconnected cells or nodes in the form of layers. Historically,
neural networks were built in a way that imitates the human brain!
![]() |
The mysteries of the human brain |
Deep learning models use neural networks to train data. In a neural network
such as CNN or RNN, data moves from the first layer to the last layer in an
orderly manner. As it moves, the model learns the sequence of the input
data!
For example, if we give a sentence as an input, it learns the order of the
words in the sentence and gives similar sentences as output.
What are the parts of a neural network?
Broadly classifying, a neural network consists of 3 main parts:
1. The Input Layer
2. The Hidden Layers
3. The Output Layer
The input layer takes the input given by the user.
The hidden layers are where most of the data processing takes place.
The output layer gives the output to the user.
What exactly does a neural network do?
Let's say we want to build a model that converts English sentences to Spanish.
In this case, the model would require English sentences and Spanish sentences
as input.
The neural network of this model would consist of 2 main layers:
1. The Encoder layer
2. The Decoder layer
To put it in simple terms, the encoder layer (which consists of the input
layer) takes English sentences as input and converts them to a format that
machines can understand.
The decoder layer (which consists of the output layer) then uses this format
of the English sentences and associates them with their respective Spanish
counterparts.
This way, the model learns to convert English sentences to Spanish sentences.
A cute pup
If you feel like any of this is hard to understand, then don't worry. Deep
learning isn't rocket science, it's just Quantum Physics!
"Don't fear intelligent machines. Work with them."- Garry Kasparov
Thank you for taking your time to read this blog. More blogs coming up. And
until then, Adios! 👋👋
Feel free to contact me using this link: