August 2018
Intermediate to advanced
378 pages
9h 9m
English
After applying multiple convolutional layers, the resulting data structure is a multi-dimensional matrix (or tensor). We must transform this into a matrix that is in the shape of the required output. For example, if our classification task has 10 classes (for example, 10 for the MNIST example), we need the output of the model to be a 1 x 10 matrix. We do this by taking the results of our convolutional and max-pooling layers and using a Flatten layer to reshape the data. The last layer should have the same number of nodes as the number of classes we wish to predict for. If our task is binary classification, the activation function in our last layer will be sigmoid. If our task is binary classification, ...