From the course: Deep Learning: Image Recognition (2018)
Unlock the full course today
Join today to access over 23,100 courses taught by industry experts.
Max pooling - Python Tutorial
From the course: Deep Learning: Image Recognition (2018)
Max pooling
- [Instructor] So far, we've created a basic convolutional neural network. Let's improve its efficiency by adding max pooling. Open up 06_max_pooling.py. Max pooling is where we scale down the output of the convolutional layers by keeping only the largest values and throwing away the smaller ones. This makes the neural network more efficient by throwing away the least useful data and keeping the most useful data. Typically, we'll do max pooling right after a block of convolutional layers. Let's go down to line 25 after we add these two layers, and add our max pooling layer. To do that, we call model.add, and then create a new max pooling 2D layer. The only parameter that we have to pass in is the size of the area that we wanna pool together. We'll use a two pixel by two pixel pool size. So, we'll pass in pool size equals, and then the ray, two comma two. That means that we'll divide their image up into two by two squares and only take the larges value from each two by two region. That…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Designing a neural network architecture for image recognition4m 7s
-
(Locked)
Exploring the CIFAR-10 data set2m 50s
-
(Locked)
Loading an image data set4m 6s
-
(Locked)
Dense layers3m 27s
-
(Locked)
Convolution layers5m 15s
-
(Locked)
Max pooling1m 40s
-
(Locked)
Dropout1m 54s
-
(Locked)
A complete neural network for image recognition2m 30s
-
(Locked)
-
-
-
-