While FC layers can be added to CNNs processing multidimensional data, this implies, however, that the input tensors passed to these layers must first be reshaped into a batched column vector—the way we did with the MNIST images for our simple network in Chapter 1, Computer Vision and Neural Networks, and Chapter 2, TensorFlow Basics and Training a Model (that is, flattening the height, width, and depth dimensions into a single vector).
While it can be advantageous in some cases for neurons to have access to the complete input map (for instance, to combine spatially distant features), fully connected layers have several shortcomings, as mentioned at the beginning of this chapter (for example, the loss of spatial information and the large number of parameters). Moreover, unlike other CNN layers, dense ones are defined by their...