CNN build with Tensorflow to classify cat and dog images
For this challenge, you will complete the code below to classify images of dogs and cats. You will use Tensorflow 2.0 and Keras to create a convolutional neural network that correctly classifies images of cats and dogs at least 63% of the time. (Extra credit if you get it to 70% accuracy!)
Some of the code is given to you but some code you must fill in to complete this challenge. Read the instruction in each text cell so you will know what you have to do in each code cell.
The first code cell imports the required libraries. The second code cell downloads the data and sets key variables. The third cell is the first place you will write your own code.
The structure of the dataset files that are downloaded looks like this (You will notice that the test directory has no subdirectories and the images are not labeled):
cats_and_dogs
|__ train:
|______ cats: [cat.0.jpg, cat.1.jpg ...]
|______ dogs: [dog.0.jpg, dog.1.jpg ...]
|__ validation:
|______ cats: [cat.2000.jpg, cat.2001.jpg ...]
|______ dogs: [dog.2000.jpg, dog.2001.jpg ...]
|__ test: [1.jpg, 2.jpg ...]
You can tweak epochs and batch size if you like, but it is not required.