【发布时间】:2020-02-08 23:48:36
【问题描述】:
运行 keras 制作的 CNN 时出现以下错误
文件 “venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py”, 第 4185 行,在 truncated_normal return tf.truncated_normal(shape, mean, stddev, dtype=dtype, seed=seed) AttributeError: module 'tensorflow' has no attribute '截断_正常'
我已经多次安装并重新安装了 Tensorflow 2.0。会发生什么?
【问题讨论】:
-
您使用的是哪个版本的 Keras?
-
Keras==2.2.4 Keras-Applications==1.0.6 Keras-Preprocessing==1.0.5
-
那个版本的Keras不支持TensorFlow 2.0,你应该降级TF或者使用Keras 2.3
-
很高兴知道,让我试试你的第二个建议,我会给你一个反馈
-
成功了。如果您回答我的问题,我肯定会将我的问题标记为已解决。非常非常感谢。
标签: python tensorflow keras