So now that we've seen these,
let's go back to the IMDB dataset
that we used earlier in this course.
Here, I'll just use an embedding
that I flattened before it goes into the dense.
My model will look like this,
with a 171,533 parameters,
and the performance will be like this.
It's nice accuracy, but clear overfitting
but it only takes about five seconds per epoch to train.
If I change this to use an LSTM,
I'll now have only 30,129 parameters,
but it will take about 43 seconds per epoch.
The accuracy is better,
but there's still some overfitting.
If I try a GRU layer instead,
with a GRU being a different type of RNN,
and I make it bidirectional,
my network will have a 169,997 parameters.
My training time will fall to 20 seconds per epoch,
and my accuracy is again very good on training,
and not too bad on validation
but again, showing some overfitting.
With a convolutional network,
I'll have a 171,149 parameters and it
only takes about six seconds per epoch to
get me close to 100 percent accuracy on training,
and about 83 percent on validation,
but again with overfitting.