Pooling and Padding in Convolutional Neural Networks and Deep Learning
Summary
TLDRThis tutorial video dives into the intricacies of pooling in convolutional neural networks (CNNs), a crucial component for feature extraction and dimensionality reduction. It explains the concept of pooling, focusing on max pooling and average pooling, and their respective roles in identifying the most significant features within an image. The video also covers the use of padding to maintain image dimensions during the pooling process, which is essential for preserving detail for further feature extraction in deeper layers of the CNN. Practical examples using TensorFlow and Keras illustrate how to implement max pooling with and without padding, and how to adjust stride parameters to control the dimensionality of the output. The presenter emphasizes the importance of understanding pooling and padding for optimizing neural network performance and efficiency, especially when dealing with complex applications.
Takeaways
- π The video provides an introduction to pooling in convolutional neural networks (CNNs), focusing on max pooling and its application after convolutional layers.
- π Max pooling is used to extract the most important features from a given region in the image, typically by selecting the maximum value within a defined area, such as 2x2 or 3x3.
- π’ Average pooling is an alternative method that smoothens the information by taking the average value within the specified area, which can be useful when preserving background information is important.
- π Global pooling operates on the entire image, either using max or average pooling to produce a single value that can be used for classification tasks without a fully connected layer.
- π Max pooling reduces the spatial dimensions of the image, which can help in downscaling while retaining important features, thus simplifying the network and improving computational efficiency.
- π Padding is a technique used to maintain the dimensionality of the image after pooling by adding zeros around the image's border, which can be particularly useful in preserving the resolution for subsequent layers.
- π οΈ The video demonstrates how to implement max pooling and padding in a CNN using TensorFlow and Keras, showcasing how to adjust pool size, strides, and padding within the model architecture.
- βοΈ Striding is a parameter that determines how the pooling window moves across the image; a stride of one moves the window element by element, whereas a larger stride covers more ground with each step.
- βοΈ The choice between using padding or not depends on the desired outcome: using 'same' padding maintains the image dimensions, while 'valid' reduces them, which can be useful for feature extraction at lower resolutions.
- π The video emphasizes the importance of understanding how pooling and padding affect the CNN's performance, as they influence the network's ability to learn from and make predictions based on image features.
- π By reducing the image dimensions and complexity through pooling, the network can focus on the most significant features, which can enhance training and prediction speeds.
Q & A
What is the main focus of the video?
-The video focuses on explaining the concepts of pooling and convolutional networks, specifically discussing different pooling methods such as max pooling, average pooling, and global pooling, as well as the use of padding in convolutional neural networks.
Why is pooling often used after convolutional layers in CNNs?
-Pooling is used after convolutional layers to downscale the image while retaining the most important features. It helps to reduce the complexity of the network, decrease the amount of parameters, and make the network more robust to variations in the input data.
What is the purpose of max pooling?
-Max pooling is used to extract the most important pixels or features from a given region in the image. It selects the maximum value within the pooling window and is useful for keeping only the most significant information while reducing the spatial dimensions of the representation.
How does average pooling differ from max pooling?
-Average pooling calculates the average value of all pixels within the pooling window, which helps to smooth out the information in the image. It is used when one wants to retain a more comprehensive representation of the image rather than just the most significant features.
What is global pooling and when might it be used?
-Global pooling is a type of pooling that considers the entire image at once. It is used to reduce the spatial dimensions to a single vector, which can be useful when the fully connected layers are not needed, or when a single feature is to be extracted from the entire image.
Why is padding used in max pooling layers?
-Padding is used to maintain the dimensions of the image after pooling. It adds zeros around the image, which allows the pooling operation to be performed at the edges of the image without losing spatial resolution.
What is the effect of using strides in max pooling?
-Strides determine how many pixels the filter moves over the image for each iteration. A larger stride value means the pooling operation will cover more pixels in each step, which can reduce the spatial dimensions of the output image more quickly.
How does the choice between 'same' and 'valid' padding affect the output dimensions of the image?
-Using 'same' padding keeps the output dimensions the same as the input dimensions after pooling, while 'valid' padding does not add any padding and thus reduces the output dimensions based on the pool size and stride.
What is the role of a fully connected layer in a CNN?
-A fully connected layer is typically the last layer in a CNN, where the high-level features extracted by the convolutional and pooling layers are used to make predictions or classifications. It takes the flattened output from the previous layers and applies a dense network structure for the final task.
How does the complexity of CNNs differ from that of a standard ANN?
-CNNs are more complex than standard ANNs due to the additional layers and the presence of a large number of trainable parameters, such as the various filters used in convolutional layers, which the network learns during training.
What are some applications of CNNs mentioned in the video?
-The video mentions that CNNs are used in applications like autonomous driving by companies like Tesla, where they are utilized for tasks such as recognizing objects and making decisions based on visual input.
How can one join the community for discussing neural networks and deep learning?
-The video encourages viewers to join a Discord server, which is linked in the video description, to discuss topics related to neural networks, deep learning, computer vision, and to seek help or inspiration for their projects.
Outlines
π Introduction to Pooling in Convolutional Neural Networks
The video begins with an introduction to pooling layers in convolutional neural networks (CNNs). It discusses the importance of pooling after convolutional layers to reduce dimensionality and focus on the most important features. The presenter also mentions joining a Discord server for community discussions and support. A recap of the previous video on CNNs is provided, highlighting the use of convolution and pooling to extract features from images. Different pooling methods, such as max pooling and average pooling, are introduced, along with the concept of padding to maintain image dimensions during pooling.
π The Role of Max Pooling in CNNs
This paragraph delves into the specifics of max pooling, explaining how it extracts the most important pixels from a given area in an image. The use of max pooling in downscaling images while retaining significant information is emphasized. It also contrasts max pooling with average pooling, which smoothens the information and is less commonly used. The paragraph includes an example of applying max pooling to a 5x5 image, resulting in a downsampled 3x3 image that retains the most important features. The potential issue of applying max pooling too many times is discussed, along with the solution of using padding to maintain image dimensions.
πΌοΈ Padding in Pooling Layers to Preserve Image Dimensions
Padding is introduced as a technique to apply zeros around an image before max pooling, which helps preserve the original dimensions of the image after pooling. The difference between padding's effect on max pooling (where zeros do not affect the result) and average pooling (where zeros can lower the average value) is explained. The paragraph also discusses when to use padding and when not to use it, depending on the desired outcome. An example of applying padding to a 5x5 image and then max pooling is provided, resulting in an image that retains its original dimensions but with the most significant values extracted.
π οΈ Specifying Pooling Parameters in Neural Network Models
The technical aspects of specifying pooling parameters in neural network models are covered in this paragraph. It discusses the different classes for pooling, such as average pooling, max pooling, and global pooling, and their application in 1D, 2D, and 3D contexts. The paragraph explains how to import the necessary modules in TensorFlow and Keras for implementing these layers. It also details how to specify the pool size, strides, and padding within the max pooling layer. An example using Keras to create a sequential model with convolutional and max pooling layers is provided, including how to adjust the stride and padding to control the dimensionality of the image as it passes through the network.
π§ Tuning Neural Networks with Max Pooling and Padding
The final paragraph focuses on the practical application of max pooling and padding in tuning neural networks. It explains how these techniques can be used to reduce the complexity of the network, improve training and prediction speeds, and enhance the network's ability to learn important features from images. The importance of understanding how max pooling and padding affect the network is emphasized, as it allows for better optimization and feature extraction. The video concludes with a reminder to subscribe and enable notifications for more content, and a teaser for upcoming tutorials on computer vision and deep learning.
πΆ Closing with Music
The video script ends with a short musical interlude, indicated by the [Music] tag. This suggests a pause or transition to the end of the video content.
Mindmap
Keywords
π‘Pooling
π‘Convolutional Networks
π‘Padding
π‘Max Pooling
π‘Average Pooling
π‘Global Pooling
π‘Strides
π‘Fully Connected Layer
π‘Feature Extraction
π‘Convolution
π‘Sequential Model
Highlights
Introduction to pooling and convolutional networks, discussing the importance of pooling layers in CNNs.
Explanation of padding in convolutional layers and its role in maintaining the dimensions of the feature maps.
Differentiation between max pooling and average pooling, and their respective advantages in feature extraction.
The concept of global pooling as an alternative to fully connected layers for certain applications.
Demonstration of how max pooling can downscale images while retaining important features.
The use of padding to maintain the dimensionality of an image after applying max pooling.
How strides in max pooling affect the dimensionality of the output and the concept of striding.
Practical example of applying max pooling to an image and the resulting effect on image resolution.
Importance of choosing between max pooling and average pooling based on the specific needs of a project.
The impact of applying max pooling multiple times on the resolution and utility of the image data.
Use of padding to preserve image dimensions when using max pooling in consecutive layers.
Explanation of how to specify pooling parameters such as pool size and strides in a neural network model.
Live coding demonstration of implementing max pooling and padding in a Keras sequential model.
How to adjust the model to reduce image dimensions using different stride values and padding options.
The significance of reducing image complexity and dimensions for improving training and prediction speed in CNNs.
Overview of the different types of pooling and their utility in tuning a neural network for optimal performance.
Encouragement for viewers to subscribe and stay updated with future content on computer vision and deep learning.
Transcripts
hey guys welcome to new video in this
new networks and deep learning tutorial
in this video here we're going to talk
about pooling and convolutional networks
and then we're talking about pooling
income election needle networks we're
also going to cover uh padding and why
we're adding padding and what padding is
when we actually like doing pooling
because in convolutional needle networks
it is often like we often use pulling
after convolutional layers so we'll have
these layers here in our convolutional
neural networks and then the
convolutional layers will be followed up
by a pulling layer
or we can do some different kind of
operations inside of that pooling layer
depending on our application or like the
purpose of our new network but first of
all remember to join the discord server
i'll link it down in the description
here so you can join the community where
we talk about some different kind of
stuff within naval networks deep
learning computer vision or and also if
you have some problems with some of your
projects yeah you can go ask them in
there and chat with other people or if
you just want some inspiration for your
own projects and stuff like that so make
sure to join the discord server and come
chat with us
so let's jump into the first slide here
where we're going to first of all we're
going to have a short recap of the last
video that we made which is was like
kind of an introduction to convolutional
neural networks so this is what we're
going to focus on like uh from from now
on in this tutorial here like previously
we mainly focused on
artificial neural networks where we
talked about the different kind of
layers and neurons and also like some
different kind of parameters that we
that we can tune on and how we can
actually like fine-tune and
fine-tune our neural network and do
transforming and stuff like that but in
the last one we talked about like
convolution like what convolution is
like how we apply convolution on on the
images that we pass through our neural
network by applying some filters that
we're convolving with the image and then
we're gonna do some different kind of
operations and then we're gonna like
train on neural networks to extract some
different kind of features um in the
different layers that we have in our
convolutional label neural network
and then we talked about like after we
have this convolutional layer here we
actually like often use this pulling
layer followed up
after the convolution layer here and
this is what we're going to focus on in
this video here we're going to talk
about some different kind of methods
that we can use for pooling and then we
can actually like um also add something
called padding to our pulling layers so
we get some different kind of features
uh which can be helpful and useful in
some different kind of situations and
then at the end here of the
convolutional neural network here we can
actually like have a fully connected
layer like or an artificial needle
network where we can actually like pass
it past like the images here that we
flattened from because from the like the
feature extracting region here and then
we can actually like do some
classification here at the end where we
can get out like if this is a cat dog
car or something like that or we get a
probability of some specific situation
that we're in and then we also talked
about some of the applications of
convolutional neural networks like how
tesla and weymour uses like
convolutional neural networks and deep
learning in general to to like for
example saw salt full cell driving um
vehicles and then we also talked about
the trainable parameters that we have in
convolution neural networks because
convolution neural networks is is a lot
more complex than just like a normal
artificial neural network because we
have more trainable parameters we have a
lot of different kind of like filters
and stuff like that that we can tune on
and the neural network like it tried to
find the best parameters for those while
training
so we went over that in the previous
videos so make sure to check that out
before you like continue with this video
here as well if you're not familiar with
convolution neural networks and what
they are
but i'll jump to the first slide here in
this video here where we're going to
talk about like what pulling is in
convolutional layers and also like uh
why we use it and why it can be useful
and like all those just like how we can
do it so pulling is actually like when
we're actually going to apply some some
filter or like some operations on top of
our image so often we will extract some
features in our convolutional layer and
then we follow it up by a pulling layer
and up the idea behind the pulling layer
is here that we're actually looking
at a region here in our image so in this
case here we specify region which is
three by three so we'll look at this
region here with the nine pixels or like
the nine elements here in this array and
this could represent that an image for
example
and we can also do this on a lot of
other different kind of like just like
matrices and stuff like that so we're
looking at this three by three right
here or like this region here in the
image
and then we can actually like apply some
different kind of methods um or like
pooling methods on this region here that
we're looking at so we have these
different types of pulling here so we
both have like have max pooling we have
average pooling and then we have some
global pooling but in the case we're
looking at a three by three area here in
our in our image or in our like matrix
then we're actually like then we can
actually like apply here mag pooling or
average pooling on this local area so
the idea behind max bowling is that we
look at all the elements here in this
area and then we just pick uh pick the
element with the highest values in this
case here if we apply max pooling in
this area here or this region here uh
the resulting value here would i feel
like b5 and then we just slide this um
slide this like kernel or like a kind of
like filler through our whole image here
and then we just move it like pixel by
pixel or like
like element by element and then we just
take the max value from from that area
um going through the whole image or the
whole matrix over here
but we can also like apply something
called average pooling where we just
like sum all the values here and then we
take the average of all the values here
so we have some different kind of
advantages and disadvantages for both of
them but we often use like max pooling
after we have this convolutional
convolutional layer because we then we
only extract the most important uh
features and the most important like um
pixels in that area that we're looking
at but we can also like use average
pooling which will just like smoothen
out like the information or like the
things we want to extract in our image
so let's say we have like the a digit
image like for example in the mnist data
set where we have like the handwritten
uh or handwritten
digits so if we just want to look like
for example add a one here like the
digit one then we can actually just use
max pooling because then we can that
then we can like sort of like downscale
our image and then we only want like the
most important information which is just
like a straight line down um with high
values in our image so we can actually
like just use max pooling and get the
maximum values and then we'll end up
with like a really uh low scale or like
a really
an image with a low resolution and like
a and like a really low scale so we can
actually like only extract the most
important information and then we don't
need to like store a lot of different
kind of values and stuff like that which
has some very nice advantages when we're
operating with convolutional neural
networks uh when they get into more like
complex applications and projects but we
can also use something called a global
pooling which is kind of the same we can
both use like average pooling or max
pooling
in global pooling as well but in global
pooling we're actually looking at the
whole image here so we take the whole
image and then we just apply like max
global pooling for example and we'll
just take uh the highest value in the
whole image here or in like in in the
array or like um in the matrix that
we're looking at so we can use for
example instead of having the fully
fully connected layer at the end where
we just have like an output nearing then
we can actually just like apply global
pooling uh to the image at the end layer
and then we just get a one value out if
if we want to get that from our
application or project
so the most used type of pooling and why
it's used and like how it affects the
convolution neon networks is probably
like max pooling so we often as i
already said we use uh convolutional
layer and then it is followed up by max
only layers where we just look at a
region and then we go through the whole
and go and then go through the whole
image
element by element and then we just take
the max element from the area that we're
looking at
so this is very often used because we
only want to extract the most important
information um when we're going layer by
layer in our convolutional layer like a
neural network but if you want it in
your application you don't only want to
like extract the most important
information and you still want to keep
like like for example some of the
background or like some of the pixels
around the most important things then
you can actually like use average
pooling instead of max pooling but it
really depends on your application and
your project that you're doing so now
we're going to see an example of like
how we can use max pooling on an image
for example so we have this image here
to the left where we have like this
matrix here where we're represented in
pixels here or like values for each of
the pixels and then we want to apply max
pulling which is a three by three in
this case here so we look at this three
by three area or region here on the
image and then we just take the max
value from this from distribution here
which is in this case five here and then
we apply it to the first element up here
because this is like the first region
that we're looking at in the image from
top uh top left corner here and then we
just go element by element and do the
exact same thing here where we're
looking at at the region and finding the
max value so we can see when we're
applying max pooling on our image here
we actually like downscale our image so
beforehand we have this five by five
image here and then when you apply max
pulling this three by three here then we
actually like downscale our image here
to o2 so we only have like a three by
three image so we actually like
downscaler image so we don't have that
much complexity and then we extract the
most important features uh from our
image by only taking the max values and
then we downscale it to like compress
our image and only get the most
important information
but if we for example like extract it
too many times or like apply max
pointing too many times then our
dimensions or like the scale or like our
resolution of the image here can
actually like be too low to actually
like be able to extract more useful
information then we can apply something
called padding to our max pooling layer
or like max pooling when we're doing
that on our image but i'll talk about
that in the next slide here and how we
can actually like still keep the
dimension off our image even though
we're applying this max pool in here
with varying um with varying like area
that we're looking at so we just can
continue doing the same thing down here
with the max pulling here then we can
see that when we act like striding and
we can actually like specify like how
many strides we want to take for each
like time we iterate through our image
here so in case we just tried one here
we would actually like just strike the
image or like the filter here that we're
applying by one so we just take this
region here instead and then we look at
the max value inside of this region here
and then we extract that and put it at
the next element up here and then it
will be a six and then at the next
iteration we take
this
area here take the max value and then
when we've done that we slide one down
here and then we start from the start
again and then we take this area here
take the max value and then we just keep
doing that until we have we have been
over like the whole image and we have
done like applied the whole like max
pooling layer from our image and then we
have actually like downscale image or
only three by three with like the most
um with the most significant values or
the most important information in our
image
so we're doing max pooling we actually
like can apply something called padding
and what what what is meant with padding
is that we just apply like zeros around
around our our image here so we just
apply like um a row here and a column of
servers here around our image so this
means that when we're actually like
applying max pooling we're actually like
looking look we'll actually look at this
area here instead of only this area down
here we'll just take the image and then
we actually like just look at the max
values here so actually like when we're
using max bullet it's good to use uh
padding because we're just taking the
maximum values of these zeros here they
won't affect the image but if we're
using average pooling for example
when we take the average of these values
here it will actually like affect um
effective result when we're taking the
average with this padding here because
we can see that we had like
five series in this case here and when
we take the average of the whole region
here we'd like to like get a lower
number compared to if we took the
average of this region here um instead
so we're actually like smoothing out our
image more by taking the average pooling
approach but in this case here we just
take the max value here and we can see
that
we have this image here where we have
like a five by five image and then we
apply padding where we just uh like add
the zeros here around our image and then
when we apply max polling we actually
like keep the same dimensions at as the
original image so we extract the most
important features from our image but we
still keep the same dimension that we
can then pass further in in the new
network and then we can extract more
important features um in the next
upcoming layers and then i'm gonna have
to like apply max pooling again but at
the start we actually like often in the
first couple of convolution layers um in
the nil network we apply like max
pooling without the padding here because
we only want to like we kind of like
won't just downscale our our image so we
don't have that much complexity and
we're only extracting most important
features but we're going down to a
really low resolution like we often like
want to keep uh dimensions so we have
like a really good dimension and we then
we extract more and more features uh
going through the layers in our
convolution neural network
so now we're going to talk about like
pooling and patterning carriers and how
we can specify it and then later here
and after that we're going into like uh
google collab and we and then we're
going to see like how we can specify
this here in an actual neural network in
code but first of all here we have this
mac pulling a class here so we have two
different kind of classes that are
window already like we both have average
pooling max pooling and global pooling
and we both have in like in 1d 2d and 3d
but in this case here we're looking at
an at images so we have this 2d max
polling that we're going to apply then
we can actually just extract it from
this tensorflow carriers layers module
here where we can then get the max
pooling layer uh layer here and then we
need to specify the pool size here which
is like the kind of like a pool or like
fill the size that we want to apply so
in this case here is a two by two but
the examples we went over here in the
slides is actually like three by three
and then we can also specify the strides
so the stretch here is is like
insecurity so it's a tubal of two
integers or none and it's the stride
values which specifies how far the
pooling windows move for each pulling
step or like for each iteration and if
it's none it will just default to pool
size so in the case of strides here we
can actually like specify how many
strikes per iteration that needs to take
so the examples we went over here in the
slides were actually like took strides
of only like the size of one so we just
went uh element by element but we can
actually like specify it it needs to
like skip and skip a row or a column
when we're actually like striding
through
our max pooling layer or if we specify
there's a non here with the default one
it will just make the same strides as
the pulling uh the pool size here so in
the case here we just specify none and
we have a pool size of two by two here
we like to like make two strides um two
strides in our in our in our max pooling
layer and that will actually like uh
give half the dimensions of the image
when we're using strides equal to two um
in this case here and if we were using
strides equal to one and we were adding
padding
to our max pooling layer then we'll
actually keep the dimensions which we're
going to see in code as well and then we
can specify here if you want to use
padding or we don't want to use padding
in our max pooling layer so we're now
jumping to google up here and i'm going
to show you how we can actually like do
this max pooling and pattern that i've
just showed you in the slides and how we
can actually apply it on a sequential
model and convolutional neural network
here in keras so first of all here we're
just going to import tensorflow with
carers and different kind of like
activation uh the flattened layer
convolutional layer and the max pooling
layer that we're going to apply here in
this video here so i'm just going to run
this blur code here and it will import
the different kind of stuff that we need
and if you want to use average pooling
for example a global max pooling and
stuff like that you need to specify it
up here in the import here so in this
case we're just importing the max
pooling two dimensional layer here then
we can go down here to our second engine
model here and see like what's going on
so first of all we have these
convolutional layers here in our
sequential model and each of the
convolutional layers here are follow up
by a max pooling layer and then inside
the max pooling layer here as we saw
from from the carriage documentation we
need to specify the pool size
and like the region that we're going to
look at in our image and then we're
going to specify this criteria that
we're taking for each iteration that
we're going through our image that we're
passing through the neural network and
then at the end here we specified that
we want to use padding in this max
pooling layer here and if we don't want
to have padding we just specified as
valid instead of the same here
so we'll do this here for each of the
convolutional layers that we have so we
apply max pulling off the convolutional
layer and we just have like the same
parameters here so we have the strides
equal to one and like the padding which
is just the same here and we also add
padding to our actual like convolutional
layer so if we run this model here it
will just like create this signature
model here with convolutional and max
pooling layers and then at the end we
flatten the output and then we pass it
to to like a dense or like the fully
connected layer here at the end so we
can do some classification problem but
if you take the summary here of the
model so we can see like what's actually
going on then we can see we start with
this 224 by 224 image and then we have
the like the number of fillers here at
the end but we can see that we actually
keep the dimensions of our image when
we're passing it through our whole new
network here and this is because we're
using this padding equal to the same
here and then we also specify the
strikes here so we're going like one by
one for each iteration uh so this will
keep the dimensions of our image when we
pass it through our neural network here
which consists of different kind of
convolutional layers and also different
kind of uh max pooling layers
but if we actually want to reduce our
dimension of the images and we actually
actually often want to use to do that um
in the start of our convolution neil
network then we can actually like just
specify here if we want that we don't
want to like for example uh we don't
want to have um have padding so we just
specify this valid keyboard here and
then we can also like specify for
example we want to take two strides
instead of
instead of taking only one stride one we
are going to apply this max pulling like
pull here that we stride over our image
that we get that we get from this
convolutional layer here
and but in this case here if we're going
to like apply this strides equal to two
here is it is the same as the non
keyboard here uh because if if we
specify none here it will just be like
this default parameter and it will just
take the same number of strides as we're
specified here um in the pool size so in
this case here we're going to try to run
this sequential model here and create a
new synchronizer model where in our max
pooling right here the first max cooling
right here we're going to take two
strides instead of only one drive and
then we're not going to apply padding in
this case here which will reduce the
dimensions of the image here so if we go
down here and run a new model here and
take a new summary of the new model that
we've created uh where we're now taking
like the the number of strides here is
is two in the first max pool and layer
and we're not using pal uh padding in
this case here so we actually like
halfing the dimension so instead of we
have this 200 by 224 by 224 image we
only have 112 by 112
image in the dimensions and then we just
passed this through here in the rest of
the layers in our neil network because
we're using strides equal to one and
we're adding adding padding for the
other different kind of match pulling
layers here that were specified but if
you want to reduce the dimensions of the
images uh even more then we can actually
like just specify the strides equal to
some other number in the next max
pooling layer or if we don't want to add
padding we just set it up here and then
it will reduce the dimensions uh further
if we still if we still don't only have
the most important information that we
want to extract from the images whenever
we pass it through our new network here
so this is how we can actually use max
pulling and padding in in our sequencing
model here in keras and it can be used
for a lot of different kind things and
it and it's actually like good for
tuning our neural network and reducing
some of the complexity in a new network
because often we don't want to pass our
new net like our image with this uh
which is like fully uh dimensions here
which is 224 by 224. we actually like
want to reduce uh the dimensions and the
complexity of our image and only extract
the most important information so our
convolutional needle network can learn
the most important features in our image
and then do predictions on that and then
also reducing like like
like the training speed and the
prediction speed and just in general the
complexity of our neural network so this
is what we can do with max pooling and
padding so this is why it's so important
to know like how it affects the neural
network how we can specify why we want
to use max pooling when we want to use
average pooling and when we use want to
use like padding or no no padding so
that's pretty much it for this video
here guys we've been over like the
different kind of stuff in convolutional
neural networks with max pooling global
pooling average pooling and a lot of
different kind of stuff which is really
useful when we're creating uh neural
networks so thank you guys for watching
this video and remember the subscribe
button and bell notification here under
the video and also like this video here
if you like the content and you want
more in the future because it just
really helps me and the youtube channel
out in a massive way and
i'm currently doing a computer vision
tutorial in opencv in both like cbs plus
and python and then we're later on we're
going to combine it with deep learning
here so we can see like how uh computer
vision and deep learning works together
and go hand in hand so if you're
interested in that tutorial i'll link to
it up here or else on just see the next
video guys bye for now
[Music]
[Music]
Browse More Related Video
5.0 / 5 (0 votes)