Hi and welcome to the chapter where we talk about why convolutional neural networks work so well for
images, so let's get started.
So firstly, let's think of this Twitter experiment.
Imagine, instead of using a convolutional neural network, we were using a regular neural network to
do image classification.
So you don't or you may not be familiar with how the architecture of a regular neural network looks
in comparison to CNN.
However, it's actually quite simple in a way everything is just fully connected.
Generally, that's the basic neural network structure.
It's just layers of fully connected nodes like this here.
So firstly, let's take a look at what how the structure changes for when we have a 28 by 28 size image
that will give us several hundred eighty four input nodes sets.
This multiplied by this just signal firstly alone.
Now that's going to cause a problem, and we will see that now because before we before we go back to
what is how much parameters our CNN look at this year, you have 10 million parameters just in one hidden
layer alone because of all these fully connected kind of connections.
Whereas with the CNN's, we were able to use 22 filters that produced a 26 by 26 feature map each,
and this only gives us two, eighteen thousand three hundred and twelve parameters.
That's a drastic reduction in number of parameters needed for CNN.
So there's a certain sacrifice anything for this.
It actually doesn't.
And that's some of the big advantages advantages of a CNN, which I'll explain why shortly.
So before we move onto that, I just want to talk about that, that neural networks, while they can
work for images, they're just not scalable.
So it's not saying that they can't work, they can work.
And in fact, many people have got decent results with the amnesty to set with standard neural networks.
However, it doesn't scale well at all to large data loss images and large networks with a lot of parameters
have a huge tendency to over fit to their training data.
That's not good.
So these are the advantages of convolutional neural networks.
Firstly, convolutional neural networks can't consult as they share parameters, as we saw previously.
This allows one single little parameter a window that little filter to be used at several parts of the
image.
So that's a form of sharing already reduces the number of parameters we need.
Secondly, because of the sparsity of connections.
And that refers to the fact that pixels are highly correlated in images.
This strong correlation allows us to use an architecture like a CNN to extract information without losing
any real information in a way that work.
So we can actually capture all the relevant information, sharing the parameters with our filters and
not having tons of connections.
So that's where we have the advantage of having sparsity of connections here.
And lastly, CNN's on variance.
Remember when the experiments appear that that means that you can shift different parts of the of the
image of the object or dog.
He can be in different parts of the image here, and CNN will still detect it.
And the reason for that for us because of some assumptions.
CNN's MC they make the assumptions that local features low level features are local, meaning that local
means are all centered or close together so that that that gives us the ability to use filters small
filters to detect features in these low level features.
Secondly, features a translation invariant, meaning that they can be found anywhere in the image and
typically high level features are made up of low level features.
That's how once you could identify an and I and I and moat, you have a strong inclination to know that's
a face, and that's how CNN's learned what these classes are.
They combine different level features, and basically that combination they would realize during the
training process is corresponds to a face.
This one corresponds to maybe a person's body.
This one corresponds to an animal, et cetera.
So those are the assumptions that CNN's make that allow us to do parameter sharing.
Next, we'll get into the very important topic of how we begin training with CNN.
So stay tuned for that.
Thank you.