tensorflow报错:ValueError: features should be a dictionary of `Tensor`s. Given type: ……

81 阅读1分钟

问题描述

使用官网列子(网址:www.tensorflow.org/get_started… ,需要翻墙)执行iris程序(该项目位于 github.com/tensorflow/… )时报错:
这里写图片描述

解决方法

更新tensorflow(tf.__version__返回版本号,我的从1.4更至1.6)

pip install --upgrade tensorflow

如果其后遇到ImportError: cannot import name 'add_newdocs'错误,使用如下命令conda install numpy,然后再更新tensorflow。