Getting ready
First, download the input images from the TensorFlow sample image dataset, available at http://download.tensorflow.org/example_images/flower_photos.tgz. Let's use 600 images for each of the three classes, making a total of 1,800 images, which is a small number of images and the right time to use transfer learning. We'll use 500 images from each class for training, reserving the remaining 100 images from each class to test the trained model. Let's also create a folder called flower_photos, with two subfolders called train and test inside it, and save our training and test images inside those folders, respectively. The folder structure should look like the following:
Let's import all the required libraries using the following ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access