Optimazation error

When I run this code I found some error optimization. But I search but I don’t find any solution

[ module ‘keras.api._v2.keras.optimizers’ has no attribute ‘adam’](https:// module ‘keras.api._v2.keras.optimizers’ has no attribute ‘adam’)


Welcome to the Tensorflow Forum!

Are you importing keras from tensorflow? Please try as shown below and let us know?

from tensorflow import keras
from tensorflow.keras.optimizers import Adam

Thank you!