The flatten layer simply converts the shape of your input data from an n-dimension matrices into a vector format that is suitable for all other densely connected layers of your neural net to interprete.
1 Like