This section describes Convolutional Neural Networks (CNNs) that are primarily applied to develop supervised and unsupervised models when the input data are images. In general, two-dimensional (2D) convolutions are applied to images but one-dimensional (1D) convolutions can be used on a sequential input to capture time dependencies. This approach is explored in this section to develop time series forecasting models.
Let's start by describing the 2D CNNs and we will derive 1D CNNs as a special case. CNNs take advantage of the 2D structure of images. Images have a rectangular dimension of w, where n is the height and h x w x n is the width of the image. The color value of every pixel would be an input feature to the model. Using a fully-connected dense layer having 28 x 28 neurons, the number of trainable weights would be 28 x 28 x 100 = 78400. For images of handwritten digits 32 x 32 from the MNIST dataset, the number of trainable weights in the...