# Understanding CNNs: Fully Connected Layers

Learn how 2D inputs like images are connected to 1D, fully connected layers.

## We'll cover the following

## Fully connected layers

Fully connected layers are a fully connected set of weights from the input to the output. These fully connected weights are able to learn global information as they are connected from each input to each output. Also, having such layers of full connectedness allows us to combine features learned by the convolution layers preceding the fully connected layers globally to produce meaningful outputs.

Let’s define the output of the last convolution or pooling layer to be of size * *is the height of the input, * *is the width of the input, and * *is the depth of the input. As an example, think of an RGB image, which will have a fixed height, fixed width, and a depth of 3 (one depth channel for each RGB component).

Then, for the initial fully connected layer found immediately after the last convolution or pooling layer, the weight matrix will be

Get hands-on with 1200+ tech skills courses.