Flatten can convert 2D image to a 1D tensor Example-Image - [ 3 1 5 1 1 5] Flatten- [ 3 1 5 1 1 5 ]
This layer is used to downsample the shape of an image Suppose you have an image- [ 2 3 4 5 3 4 5 6 4 5 6 7 ] if pool size is (2,2) then output will [ 4 6 5 7 ]