gga*_*ano 7 python windows tensorflow
我是tensorflow的新手,我正在尝试按照这个入门教程.但是在"ex001.py"脚本中执行这个非常简单的代码:
import tensorflow as tf
sess = tf.Session
hello = tf.constant('Hello, TensorFlow!')
print(hello)
print(sess.run(hello))
Run Code Online (Sandbox Code Playgroud)
我得到以下输出
Tensor("Const:0",shape =(),dtype = string)Traceback(最近一次调用最后一次):文件"C:\ Users\Giuseppe\Desktop\ex001.py",第6行,打印(sess.run) (你好))TypeError:run()缺少1个必需的位置参数:'fetches'
我已经检查了tf.Session.run()语法,但看起来没错,我找不到任何有同样问题的人.
我正在运行此配置:
提前致谢
| 归档时间: |
|
| 查看次数: |
16088 次 |
| 最近记录: |