Hi@akhtar,
I think this problem is related to the environment. Your TensorFlow module may be installed in a different env. and Keras is in a different env. So, try to uninstall the Keras module and reinstall it.
$ pip uninstall keras
$ pip install keras
Hope this will solve your error.
Build a career in Artificial Intelligence with our Post Graduate Diploma in AI and Machine Learning courses.