Convolutional layers
A convolutional layer (sometimes referred to in the literature as "filter") is a particular type of neural network that manipulates the image to highlight certain features. Before we get into the details, let's introduce a convolutional filter using some code and some examples. This will make the intuition simpler and will make understanding the theory easier. To do this we can use the keras
datasets, which makes it easy to load the data.
We will import numpy
, then the mnist
dataset, and matplotlib
to show the data:
import numpy from keras.datasets import mnist import matplotlib.pyplot as plt import matplotlib.cm as cm
Let's define our main function that takes in an integer, corresponding to the image in the mnist
dataset, and ...
Get Python Deep Learning 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.