How to Solve NameError: name 'Layer' is not defined -- keras
Solution: Import the 'Layer' module
To Solve the error, add the following line to the top of your code.
from keras.engine.base_layer import Layer
For more information:
Python keras Layer