AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

Viewed 8932

The following error appears when I import the keras library

from keras.models import Sequential
from keras.layers import Dense, LSTM
AttributeError: module 'keras.utils.generic_utils' has no attribute
'populate_dict_with_module_objects

I am working on windows 10 my keras version is: 2.4.3 and tensorflow version is 2.5.0rc0 I also installed cuda to solve the problem but it was not effective

1 Answers

Imports work perfectly with Tensorflow 2.4.1, Try this way

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, LSTM
Related