📚 The CoCalc Library - books, templates and other resources
License: OTHER
Deep Learning with TensorFlow
Credits: Forked from TensorFlow by Google
Setup
Refer to the setup instructions.
Exercise 4
Previously in 2_fullyconnected.ipynb
and 3_regularization.ipynb
, we trained fully connected networks to classify notMNIST characters.
The goal of this exercise is make the neural network convolutional.
Reformat into a TensorFlow-friendly shape:
convolutions need the image data formatted as a cube (width by height by #channels)
labels as float 1-hot encodings.
Let's build a small network with two convolutional layers, followed by one fully connected layer. Convolutional networks are more expensive computationally, so we'll limit its depth and number of fully connected nodes.
Problem 1
The convolutional model above uses convolutions with stride 2 to reduce the dimensionality. Replace the strides a max pooling operation (nn.max_pool()
) of stride 2 and kernel size 2.
Problem 2
Try to get the best performance you can using a convolutional net. Look for example at the classic LeNet5 architecture, adding Dropout, and/or adding learning rate decay.