1According to TF 1:1 Symbols Map, in TF 2.0 you should use tf.compat.v1.Session() instead of tf.Session()
2
3https://docs.google.com/spreadsheets/d/1FLFJLzg7WNP6JHODX5q8BDgptKafq_slHpnHVbJIteQ/edit#gid=0
4
5To get TF 1.x like behaviour in TF 2.0 one can run
6
7import tensorflow.compat.v1 as tf
8tf.disable_v2_behavior()
1import tensorflow as tf
2
3tf.compat.v1.disable_eager_execution()
4
5hello = tf.constant('Hello, TensorFlow!')
6
7sess = tf.compat.v1.Session()
8
9print(sess.run(hello))