Activate virtual environment
In [1]:
%%bash
source ~/kerai/bin/activate
In [2]:
%matplotlib inline
from helper import get_class_names, get_train_data, get_test_data, plot_images
Get class names
In [3]:
class_names = get_class_names()
class_names
Out[3]:
Decode and fetch the training data
In [4]:
images_train, labels_train, class_train = get_train_data()
Decode and fetch the testing data
In [5]:
images_test, labels_test, class_test = get_test_data()
In [6]:
print("Training set size:\t",len(images_train))
print("Testing set size:\t",len(images_test))
Display a few examples from the dataset
In [7]:
# Get the first images from the test-set.
images = images_test[0:9]
# Get the true classes for those images.
labels_true = labels_test[0:9]
# Plot the images and labels using our helper-function above.
plot_images(images=images, labels_true=labels_true, class_names=class_names)