1
00:00:00,000 --> 00:00:02,100
So now that we've seen these,

2
00:00:02,100 --> 00:00:04,230
let's go back to the IMDB dataset

3
00:00:04,230 --> 00:00:05,970
that we used earlier
in this course.

4
00:00:05,970 --> 00:00:08,055
Here, I'll just use an embedding

5
00:00:08,055 --> 00:00:10,755
that I flattened before
it goes into the dense.

6
00:00:10,755 --> 00:00:12,675
My model will look like this,

7
00:00:12,675 --> 00:00:16,605
with a 171,533 parameters,

8
00:00:16,605 --> 00:00:19,050
and the performance
will be like this.

9
00:00:19,050 --> 00:00:21,509
It's nice accuracy,
but clear overfitting

10
00:00:21,509 --> 00:00:25,230
but it only takes about five
seconds per epoch to train.

11
00:00:25,230 --> 00:00:28,260
If I change this to use an LSTM,

12
00:00:28,260 --> 00:00:32,265
I'll now have only
30,129 parameters,

13
00:00:32,265 --> 00:00:35,280
but it will take
about 43 seconds per epoch.

14
00:00:35,280 --> 00:00:36,780
The accuracy is better,

15
00:00:36,780 --> 00:00:38,925
but there's still
some overfitting.

16
00:00:38,925 --> 00:00:41,745
If I try a GRU layer instead,

17
00:00:41,745 --> 00:00:44,085
with a GRU being
a different type of RNN,

18
00:00:44,085 --> 00:00:46,140
and I make it bidirectional,

19
00:00:46,140 --> 00:00:51,290
my network will have
a 169,997 parameters.

20
00:00:51,290 --> 00:00:54,425
My training time will fall
to 20 seconds per epoch,

21
00:00:54,425 --> 00:00:57,395
and my accuracy is again
very good on training,

22
00:00:57,395 --> 00:00:59,060
and not too bad on validation

23
00:00:59,060 --> 00:01:01,820
but again, showing
some overfitting.

24
00:01:01,820 --> 00:01:04,870
With a convolutional network,

25
00:01:04,870 --> 00:01:09,980
I'll have a 171,149
parameters and it

26
00:01:09,980 --> 00:01:12,350
only takes about six
seconds per epoch to

27
00:01:12,350 --> 00:01:15,110
get me close to 100 percent
accuracy on training,

28
00:01:15,110 --> 00:01:17,275
and about 83 percent
on validation,

29
00:01:17,275 --> 00:01:19,570
but again with overfitting.