Deep CNN
Now, in this section, let's think big. In this section, we're going to add a convolutional and pooling layer combo to our font classification model. We'll make sure to feed this into a dense layer and we'll see how this model does. Before jumping into the new convolutional model, make sure to start a fresh IPython session. Execute everything up to num_filters = 4
and you'll be ready to go.
Adding convolutional and pooling layer combo
For our convolutional layer we're going to use a 5x5 window with four features extracted. This is a little bigger than the example.
We really want the model to learn something now. First we should use tf.reshape
to put our 36x36 image into a tensor of size 36x36x1.
x_im = tf.reshape(x, [-1,36,36,1])
This is only important to keep the number of channels straight. Now we'll just set up the constants for our number of filters and window as just described:
num_filters = 4 winx = 5 winy = 5
We can set up our weight tensor just...