April 2017
Intermediate to advanced
406 pages
10h 15m
English
Now that we have the intuition of how convolutional layers work, we are going to implement a simple example of a convolutional layer using Theano.
Let us start by importing the modules that are needed:
import numpy import theano import matplotlib.pyplot as plt import theano.tensor as T from theano.tensor.nnet import conv import skimage.data import matplotlib.cm as cm
Theano works by first creating a symbolic representation of the operations we define. We will later have another example using Keras, that, while it provides a nice interface to make creating neural networks easier, it lacks some of the flexibility one can have by using Theano (or TensorFlow) directly.
We define the variables needed and the neural network ...