M
M
monitor812021-11-07 22:03:01
PyCharm
monitor81, 2021-11-07 22:03:01

How to fix the error - module 'tensorflow' has no attribute 'models'?

Tell me how to deal with such an error?
In PyCharm I'm running a web application, but when the model loading should work:
model = keras.models.load_model(r"C:\Users\monit\cat_dogs.h5")
an error occurs:
AttributeError: module 'tensorflow' has no attribute 'models '

Note. I've tried reinstalling tensorflow, but it didn't fix the problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question