357482 (1) [Avatar] Offline
#1
Flatten layer is used in several examples in the book and it is clear that it is a necessary tool for tensor dimensions reduction. What Flatten does is intuitively clear. Nevertheless I believe that it is useful to have more precise knowledge what happens behind the screen. Would it be possible to explain the mechanism in detail in the book?
475801 (1) [Avatar] Offline
#2
It converts input tensor to output vector [1, N],
e.g. in numpy, vector = tensor.reshape(-1) (see https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html)
Number of elements in output vector remains the same as in input tensor, so, it is not about reduction