What is the primary function of the flattening layer in a convolutional neural network architecture? A) Converting the feature maps into a 1D vector
B) Introducing regularization to prevent overfitting
C) Applying an activation function to the features
D) For transfer-learning
What is the primary function of the flattening layer in a convolutional neural network architecture?
Share
The correct answer is A) Converting the feature maps into a 1D vector.
Explanation: The flattening layer in a convolutional neural network (CNN) takes the multi-dimensional output (feature maps) from the previous layers and transforms it into a one-dimensional vector. This step is crucial because it prepares the data to be fed into fully connected (dense) layers, which require the input in a flat format to perform classification or regression tasks.