我使用pip方法安装了tensorflow(在python 2.7,debian linux上),如官方文档所示:https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation
按照安装指示测试安装成功,但是在执行教程时:https://www.tensorflow.org/versions/r0.9/tutorials/tflearn/index.html#construct-a-deep-neural-network-classifier https://www.tensorflow.org/versions/r0.9/tutorials/tflearn/index.html#construct-a-deep-neural-network-classifier
正确导入张量流后,尝试该行时:
training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING, target_dtype=np.int)
我收到错误:
张量流“模块”对象没有属性“contrib”
有人知道这可能是错的吗?
谢谢
问题解决了,我安装了 2 个张量流版本:
- 启动 $python 时,它使用 0.6 版本(没有 contrib 模块)
- 当启动 $sudo python 时,它有最新的 0.9 版本,一切都像文档一样工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)