CNN: Step 3— Flattening

Panadda Kongsilp
2 min readJul 22, 2019

Today, we’re talking about flattening.

So, we’ve got the pooled layer, pooled feature map. After we apply the convolution operation to our image and then we apply pooling to the results of the convolution which is the convolved image.

What are we going to do with this pooled feature map? What’s Flattening?

We’re going to take it and we’re going to flatten it into a column. Basically, just take the numbers row by row, and put them into this one long column.

The purpose is that we want to later input this into an artificial neural network for further processing.

When you have many pooling layers, or you have the pooling layers with many pooled feature maps and then you flatten them. So, you put them into this one long column sequentially one after the other. And you get one huge vector of inputs for an artificial neural network.

So, to sum all this up, we’ve got an input image. We apply a convolution layer, then we apply pooling, and then we flatten everything into a long vector which will be our input layer for an artificial neural network.

Now, we are ready to build CNN model. See you in the next chapter.

Hope you enjoy it!

--

--