【问题标题】:Dataset of MNIST not found from Tensorflow从 Tensorflow 中找不到 MNIST 的数据集
【发布时间】:2018-09-01 18:28:18
【问题描述】:

我有一个 Python 脚本,其初始行为

from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf

当我运行脚本时出现此错误

'没有 tensorflow.tutorials.examples.mnist 等模块'.

我已经 pip 安装了 Tensorflow,我现在该怎么办?

【问题讨论】:

  • 您确定 TensorFlow 工作正常吗?请在 Python 中尝试“import tensorflow as tf”,然后是“print(tf.__version__)”。如果出现错误,则可能是您的 TensorFlow 安装存在问题。
  • 我卸载重装了,还是一样的错误。我在哪里运行我的脚本?我尝试使用 windows 命令提示符和 python 和 anaconda 命令行,不工作:(

标签: tensorflow mnist


【解决方案1】:

从您的评论中,我可以看到您正在使用 Anaconda。你试过用conda install tensorflow 安装它吗?此外,您可以尝试先创建一个环境,然后在其中安装带有conda create -n tensorflow pip python=2.7(或 3.x,具体取决于您的系统)的 tensorflow。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-04
    • 2021-08-16
    • 2019-04-01
    • 2016-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多