Image classification with convolutional networks

Let's look at a more realistic case for using CNNs; we will use the Stanford Dogs versus Cats dataset. This dataset has 100+ images of dogs and cats.

You can download this dataset (100 images each) from the following location: https://s3.amazonaws.com/neural-networking-book/ch04/dogs_vs_cats.tar.gz
  1. Import the relevant functions and Python classes:
import matplotlib.pyplot as plt
import tensorflow as tf
import pandas as pd
import numpy as np
from sklearn.metrics import confusion_matrix
import time
from datetime import timedelta
import math
import dataset
import random
  1. We will define the parameters for the convolution layers. There are three convolution layers with the following parameters: ...

Get Neural Network Programming with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.