ModuleNotFoundError:没有名为“ tensorflow.example”的模块

时间:2018-06-24 01:06:50

标签: python python-3.x tensorflow compiler-errors

当我尝试运行mnist示例时,它给出了

  

回溯(最近通话最近):文件   “ D:\ tensorflow \ tensorflow_python_code \ basic_programs \ tfBasics_numberDetect.py”,   第3行,在       从tensorflow.example.tutorials.mnist导入input_data   ModuleNotFoundError:没有名为“ tensorflow.example”的模块

这是给出错误的代码行

from tensorflow.example.tutorials.mnist import input_data
mnist = input_data.read_data_sets("tmp/data", one_hot=true)

我已经安装了input_data和Tensorflow。其他Tensorflow代码也可以使用。

系统规格--------- 的Python:3.6.5 操作系统:Windows 10 pro 处理器:Ryzen 2600 GPU:Gtx 1070ti Tensorflow:1.8 CUDA:9.0

cuDNN:7.0

0 个答案:

没有答案