ModuleNotFoundError: No module named 'tensorflow.compat.v1.examples'
from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data.sets('要下载的MNIST数据集的目录', one_hot=True)
http://yann.lecun.com/exdb/mnist/
Mnist数据集
官网直接下载Mnist手写数据集tensorflow
下载,在github
中下载examples中的tutorials文件夹
,连接在这里:tutorials文件夹下载将这个文件夹复制到你安装的tensorflow框架
的xxxx\Lib\site-packages\tensorflow_core\examples
目录中,再执行上面的下载命令就能够了。若是出现超时链接,则直接在Mnist
数据集官网下载数据集便可。python