The functionality is as follows:
- By using the sequential function, a nine-layer convolutional neural network is defined with each layer performing the following functions:
- The first layer is a convolutional layer with 16 neurons and performs convolution on the input tensor/matrix. The size of the feature map is defined to be a 3 x 3 matrix. The input shape needs to be specified for the first layer since the neural network needs to know what type of input to expect. Since all the images have been cropped to a size of 128 x 150 pixels, this will be the input shape defined for the first layer of the network as well. The activation function used in this layer is a rectified linear unit (relu).
- The second layer of the network ...