The fully connected layer of a CNN works in the same manner as that of a vanilla feedforward network. This layer maps the outputs extracted from the image to the outputs that we desire from the network, such as a label for an image:
![](https://static.packt-cdn.com/products/9781788991063/graphics/assets/85b80730-0f00-4d28-b8c2-df0383730a18.png)
In the preceding diagram, our inputs are represented by the blue nodes, which are fed into the first convolutional layer, A. We then have a max pooling layer, a second convolutional layer, and finally the fully connected layer, which transforms our output into human– readable output. As with vanilla feedforward networks, we typically use a cross-entropy loss function for classification tasks.