Let's start off by importing the required packages for this implementation:
%matplotlib inline
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
import time
from datetime import timedelta
import os
# Importing a helper module for the functions of the Inception model.
import inception
Next up, we need to load another helper script that we can use to download the processing CIFAR-10 dataset:
import cifar10
#importing number of classes of CIFAR-10
from cifar10 import num_classes
If you haven't done this already, you need to set the path for CIFAR-10. This path will be used by the cifar-10.py script to persist the dataset:
cifar10.data_path = "data/CIFAR-10/"
The CIFAR-10 dataset is about 170 MB, the next line checks if the dataset is already downloaded if not it downloads the dataset and store in the previous data_path:
cifar10.maybe_download_and_extract</span>()
Output:
- Download progress: 100.0%
Download finished. Extracting files.
Done.
Let's see the categories that we have in the CIFAR-10 dataset:
#Loading the class names of CIFAR-10 dataset
class_names = cifar10.load_class_names() class_names
Output: