Flatten

The Flatten block reshapes the input, which could be a tensor of any shape, into a 1-dimensional vector.

One of its uses is to feed data coming from convolutional layers into a Dense layer, for instance in the middle of some auto-encoders. It is also useful when wanting to Concatenate a convolutional part of a model with an MLP part that has Dense layers, since Dense layers operate on 1D input.

The Flatten block reshapes the input into a 1-dimensional vector.
Figure 1. The Flatten block reshapes the input into a 1-dimensional vector.
Try the platform