if you got this error, you shoud use this order "from keras.optimizers_v1 import Adam" instead of "from keras.optimizers import Adam"