Convolutions
In this section, we will learn about convolutions. We're going to see the structure of a convolutional network, and then we're going to apply that to two dimensions, just like we would if we were using it for an image. Finally, we're going to discuss the benefits of a convolutional network and why you would choose to use one.
Alright, let's get started! First, we're going to import the networkx
packages and matplotlib
, just like we did for the classical neural network:

Importing packages
The code here is similar to what we learned in the previous chapter, but there's a minor change:

Connecting from the inputs to the activation
You will have noticed that where we are connecting from the inputs to the activation, rather than connecting every input to every activation, we have a window. In this case, we're using a window of three, and that window then makes a sparser set of connections. The sparser set of connections, as you can see here in the actual image, means that not every input...