WEBVTT

00:00.570 --> 00:02.970
-: Hello, and welcome back to the course on deep learning.

00:02.970 --> 00:04.050
I hope you're tracking along

00:04.050 --> 00:06.249
with these intuition tutorials just fine

00:06.249 --> 00:08.580
and that you had a chance to play around

00:08.580 --> 00:10.236
with everything we've learned so far.

00:10.236 --> 00:12.120
And today, we're talking about flattening.

00:12.120 --> 00:14.940
And the good news is that this is a very simple step,

00:14.940 --> 00:17.970
and this tutorial's going to be very quick.

00:17.970 --> 00:19.080
And then, we'll be able to move

00:19.080 --> 00:21.900
onto the next interesting things.

00:21.900 --> 00:23.250
All right, so we, so far,

00:23.250 --> 00:25.500
we've got the pooled layer, pooled feature map,

00:25.500 --> 00:29.940
and that is after we apply the convolution operation

00:29.940 --> 00:33.150
to our image, and then we apply pooling to the result

00:33.150 --> 00:35.100
of the convolution, which is the convolved image.

00:35.100 --> 00:36.210
And so, what are we going to do

00:36.210 --> 00:37.560
with this pooled feature map?

00:37.560 --> 00:38.580
Well, we're going to take it,

00:38.580 --> 00:41.004
and we're going to flatten it into a column.

00:41.004 --> 00:43.992
So basically, just take the numbers row by row

00:43.992 --> 00:46.443
and put them into this one long column.

00:46.443 --> 00:48.270
And the reason for that is

00:48.270 --> 00:50.550
because we want to later input this

00:50.550 --> 00:55.290
into an artificial neural network for further processing.

00:55.290 --> 00:56.760
So, this is what it looks like

00:56.760 --> 00:58.680
when you have many pooling layers,

00:58.680 --> 00:59.670
or you have the pooling layers

00:59.670 --> 01:04.230
with many pooled feature maps, and then you flatten them.

01:04.230 --> 01:07.260
So, you put them into this one long column,

01:07.260 --> 01:08.663
sequentially one off to the other,

01:08.663 --> 01:12.300
and you get one huge vector

01:12.300 --> 01:15.021
of inputs for an artificial neural network.

01:15.021 --> 01:19.380
And so, to sum all of this up, we've got an input image.

01:19.380 --> 01:21.090
We apply a convolution layer,

01:21.090 --> 01:23.910
and let's not forget the ReLU,

01:23.910 --> 01:27.390
or rectified linear units function,

01:27.390 --> 01:30.030
that we apply after the convolution layer as well.

01:30.030 --> 01:33.353
And then, we apply pooling, and then we flatten everything

01:33.353 --> 01:38.353
into a long vector, which will be our input layer

01:40.170 --> 01:42.990
for an artificial neural network.

01:42.990 --> 01:44.430
And exactly how that works,

01:44.430 --> 01:47.190
we'll find out in the next tutorial.

01:47.190 --> 01:48.450
Hope you enjoy today's session,

01:48.450 --> 01:49.980
and I look forward to you next time.

01:49.980 --> 01:51.903
Until then, enjoy deep learning.
