Max Over Time in imdb_cnn.py (#2320)
Max Over Time in imdb_cnn.py (#2320)

* Max Over Time in imdb_cnn.py

Following this issue https://github.com/fchollet/keras/issues/2296 i propose this PR.
The mayor optimisation a part of the Max over time are:

- Dropout in the Embedding layer.
- Longer input sequences (400 instead of 100), made possible from the speedup of the Max Over Time.
- Adam optimizer.

Overall it takes 90 to 100 sec per epoch on my laptop CPU and in two epochs it reaches 0.885 accuracy that is a 5 points improvement over the previous implementation. Moreover it requires less memory (300k parameters vs 3M+) since the number of parameters do not depend  by the length of the input sequence anymore.

* Update imdb_cnn.py

nebw/keras,relh/keras,DeepGnosis/keras,keras-team/keras,keras-team/keras,kuza55/keras,dolaameng/keras,kemaswill/keras