The Flatten Layer, Explained

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

My assignment asks us to do a flattening operation. But why are we even flattening an image???

JoshCaiLovzu
Автор

WHY DO WE FLATTEN? The quick answer is because we want to convert images or other multi-dimensional data into one-dimensional linear tensors or vectors that can be used as inputs to the next layer of a neural network (say, artificial neural networks, or ANNs). In convolutional neural networks (CNNs), 'we flatten the output of the convolutional layers to create a single long feature vector. And it is connected to the final classification model, which is called a fully-connected layer. In other words, we put all the pixel data in one line and make connections with the final layer.' [1]

As mentioned by @WahranRai in a comment, flattening happens row by row starting from the top row and then going left to right through the cells of each row.

[ 1 ] [ 2 ] [ 3 ]
[ 4 ] [ 5 ] [ 6 ] - - - - - - - › [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ]
[ 7 ] [ 8 ] [ 9 ]

🔗 References

Автор

good stuff, love the reason why this is done to enable you to pass model onto ANN.

sngoh
Автор

simple and good explanation. good quality video too

fiya..
Автор

Nice! the explanation is easy to understand👍

fauzimaulanaalam
Автор

Thank you Nono for the informative video, keep going mate :)

lonesurvivor
Автор

May be you must precise that is flattening is row by row

WahranRai
Автор

Why do we use flatten ? What's the need to convert it into linear form?

randomtuber
Автор

you're looking to some comedian guy :thinking:

niektuytel