tensorflow 2.0没有Session()板块解决办法

出现问题:
tensorflow 2.0没有Session()板块解决办法_第1张图片
解决方法:

import tensorflow as tf
tf.compat.v1.disable_eager_execution()
hello = tf.constant('hello,tf')
sess = tf.compat.v1.Session()
print(sess.run(hello))```

你可能感兴趣的:(图像处理)