From the course: Deep Learning: Image Recognition

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Convolution layers

Convolution layers - Python Tutorial

From the course: Deep Learning: Image Recognition

Start my 1-month free trial

Convolution layers

- [Instructor] So far, we've created the neural network with densely connected layers. Now we're ready to add convolutional layers to make it better at finding patterns in images. Let's open up 05_convolutional_layers.py. To be able to recognize images officially, we'll add convolutional layers before our densely connected layers. Convolutional layers are able to look for patterns in an image, no matter where the pattern appears in the image. Let's go down to line 22, this is where we'll insert a convolutional layer. First, to add the layer, we'll call model.add. Now there's two types of convolutional layers: 1D and 2D. Since we're working with images, we'll want to add the two dimensional convolutional layer. For some kinds of data, like sound waves, you can use one dimensional convolutional layers, but typically you'll be working with 2D layers. To create one, we just create a new Conv2D object and then pass in the parameters. The first parameter is how many different filters should…

Contents