Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 586
vahidkoohkan Avatar asked Apr 11 '21 19:04

vahidkoohkan


People also ask

What does keras utils To_categorical do?

utils. to_categorical. Converts a class vector (integers) to binary class matrix.

What is keras backend?

What is a "backend"? Keras is a model-level library, providing high-level building blocks for developing deep learning models. It does not handle itself low-level operations such as tensor products, convolutions and so on.


Video Answer


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
like image 195
TFer Avatar answered Oct 12 '22 11:10

TFer