From the course: Deep Learning with Python: Convolutional Neural Networks

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Defining a CNN in Python

Defining a CNN in Python

- [Instructor] This video is a second in a sequence of three that walks us through the process of building a Convolutional Neural Network in Python using Keras. In the previous video, we went through the process of importing and pre-process our data. So if you haven't done so, I suggest that you rerun the code up to the first four code cells in preparation for the rest of what we're going to talk about in this video. So in this video, our focus is going to be on defining the model architecture. The first thing we do is create a "Sequential Model". This is a linear stack of layers that simplifies the construction of neural networks. So we specify the model name and we say "Keras.sequential" to initialize the process. Then we define the input shape of our data. So decipher 10 image dataset has images that are 32 pixels by 32 pixels in size with three color channels. Notice that this is a channel's last definition because we're using Keras. So we specify the input shape, 32, 32, three…

Contents