Fully-Connected

Understand how fully-connected layers can be used to aggregate and flatten data.

Chapter Goals:

  • Convert the NHWC format data into a batch of flattened vectors
  • Apply a fully-connected layer to the flattened data

A. Fully-connected layer

We apply a fully-connected layer of size 1024 (i.e. the number of neurons in the layer) to the output data of the second pooling layer. The number of units is somewhat arbitrary. Enough to be powerful, but not so much as to be too resource intensive. The purpose of the fully-connected layer is to aggregate the data features before we convert them to logits. This allows the model to make better predictions than if we had just converted the pooling output directly to ...