1、加载MNIST报错 :由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败
解决方法:
- 网络问题,重新运行一下
- 从百度网盘上下载,并解压到keras下载数据集默认的路径中
2、tensorflow.python.framework.errors_impl.NotFoundError: Could not find valid device for node.
原因:tensor为浮点型才可进行tf.sigmoid运算
解决方法:将tf.int32改成tf.float32
3、Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
原因:你下载的TensorFlow太低了,没有通过兼容AVX来Compile。
解决方法:在最顶行写入
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'