Project Creation: Part Two
In this lesson, we will be using the model architecture that we built in the previous lesson to train our model.
We'll cover the following...
We successfully built our model architecture in the previous lesson. However, we still need to process our images before actually feeding them to the network.
Processing the images
So, let’s process our training and validation images, which you downloaded from the link provided in the previous lesson.
Press + to interact
train_datagen = image.ImageDataGenerator(rescale=1./255, shear_range=0.2, zoom_range=0.2, horizontal_flip=True)test_datagen = image.ImageDataGenerator(rescale = 1./255)print('Created the Data Generator Objects.')
Explanation:
- We used
ImageDataGenerator
, which will generate batches of tensor image data with real-time data augmentation. The data will be looped over (in batches). This will help prevent over-fitting as we have