【发布时间】:2021-03-10 15:31:17
【问题描述】:
我正在通过 website 学习 Tensorflow,并输入以下代码:
import tensorflow as tf
x = tf.constant(35, name='x')
y = tf.Variable(x+5, name='y')
model = tf.compat.v1.global_variables_initializer()
with tf.compat.v1.Session() as session :
session.run(model)
print(session.run(y))
我收到如下错误:
我该如何解决这个错误?
【问题讨论】:
标签: tensorflow