在TensorFlow中运行程序多次报错:AttributeError: __exit__

我没有记住语句

with tf.Session() as sess:

多次写成了 with tf.Session as sess:

吃括号这个低级的错误又犯了