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.
Dense layers - Python Tutorial
From the course: Deep Learning: Image Recognition
Dense layers
- [Instructor] Now that we've loaded our data set, we're ready to create a neural network and add the first densely connected layer to it. Let's open open up 04 dense layers.py. The code to load the data set is already here. Starting on line 21 we're ready to add the code to create the neural network itself. The simplest type of neural network has an input, a densely connected layer and then an output. Let's start by creating that. First we need to create a new neural network object in Keras. To do that, we create a new sequential object. So we say model = sequential. The sequential api lets us create a neural network by adding new layers to it one at a time. It's call sequential because you add each layer in sequence and they automatically get connected together in that order. To add a new layer we just call model.add. And then we pass on the type of layer that we want to add. Let's create a dense layer object. This layer class takes on a few parameters. First, we need to tell it how…
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)
-
-
-
-