python - 由于 AttributeError : 'module' object has no attribute 'datasets' ,Tensorflow 示例全部失败

标签 python tensorflow skflow

我已经使用 pip install 构建了 tensorflow v0.8.0,但是当我尝试任何 skflow 示例时,由于

AttributeError: 'module' object has no attribute 'datasets'

这是因为

from tensorflow.contrib import learn

### Training data

# Downloads, unpacks and reads DBpedia dataset.
dbpedia = learn.datasets.load_dataset('dbpedia')

最佳答案

很多人都遇到过这种情况。请安装最新版本,例如最近的夜间构建之一。

从命令行运行它

pip3 install --upgrade http://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_CONTAINER_TYPE=CPU,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl

关于python - 由于 AttributeError : 'module' object has no attribute 'datasets' ,Tensorflow 示例全部失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37206459/

相关文章:

python - MS SQL Python 日期时间晚于但不等于 '>' 返回结果为 '>='

machine-learning - TensorFlow错误: "logits and labels must be same size", WarmSpringWinds "tutorial"

graph - 分布式 tensorflow : the difference between In-graph replication and Between-graph replication

TensorFlow 出现错误 - 具有多个元素的数组的真值不明确

python - 自动传输文件到文件夹(OpenCV)

python - 将函数重新定义为自身的一部分——为什么非法?

python - 哪个更高层抽象用于tensorflow

python - 如何使用 `input_fn` 和 `read_batch_examples` 设置来创建 `num_epochs`?

Python - Ctype.windll.kernel32.CreateThread 参数值

python - skflow 回归预测多个值