Data preparation

We will start by downloading the data from Kaggle (https://www.kaggle.com/c/dogs-vs-cats/data) and unzipping the train.zip in the book's Chapter08 directory. You'll now have a single directory called train/ with 25,000 images. Each will be named something like cat.number.jpg.

We want to move this data around so that we have separate directories for train, val, and test. Each of these directories should then have a cat and dog directory. This is all very boring and mundane work, so I've created data_setup.py to do this for you. Once you run it, the data will all be formatted appropriately for the rest of the chapter.

When you're done, you will have a data directory with the following structure:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.105.215