December 2018
Intermediate to advanced
764 pages
18h 18m
English
Although RNN is mostly used for sequence data, it can also be used for image data. We know that images have minimum two dimensions - height and width. Now think of one of the dimensions as time steps, and other as features. For MNIST, the image size is 28 x 28 pixels, thus we can think of an MNIST image as having 28 time steps with 28 features in each timestep.
Let us build and train an RNN for MNIST in Keras to quickly glance over the process of building and training the RNN models.
Import the required modules:
import kerasfrom keras.models import Sequentialfrom keras.layers import Dense, Activationfrom keras.layers.recurrent import ...
Read now
Unlock full access