How to Solve NameError: name 'Flatten' is not defined -- keras

Solution: Import the 'Flatten' module

To Solve the error, add the following line to the top of your code.

from keras.layers.core import Flatten

 

For more information:
Python keras Flatten