yinguobing / cnn-facial-landmark

Training code for facial landmark detection based on deep convolutional neural network.
MIT License
623 stars 183 forks source link

What is the importance of the flatten layer? #81

Open abdou31 opened 4 years ago

abdou31 commented 4 years ago

Hello, I focus on my project for now, as I see when I read the document that you gave me is that the network is like this: image

But when I see the script landmark.py (old version), I noticed that there is an other layer that does not write on the document, I'm talking about the flattening layer. I would like to know is it important to mention that layer or no?                    

yinguobing commented 4 years ago

The flatten layer is required so the input of the following dense layer is a vector other than matrix.

abdou31 commented 4 years ago

If I understand what you say , you mean that the input of the first dense layer ( full 1024 ) should be vector. For what reason?