AttributeError:模块“keras.utils.generic_utils”没有属性“populate_dict_with_module_objects”
导入keras库时出现以下错误
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
我在 windows 10 上工作,我的 keras 版本是:2.4.3,tensorflow 版本是 2.5.0rc0 我也安装了 cuda 来解决这个问题,但没有效果
回答
导入与 Tensorflow 2.4.1 完美配合,试试这种方式
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, LSTM
THE END
二维码