Skip to main content
deleted 19 characters in body
Source Link

For TF2.x, you can do like this.

import tensorflow as tf with tf.compat.v1.Session() as sess: hello = tf.constant('hello world') print(sess.run(hello)) 

avoid disabling eager execution>>> b'hello world

For TF2.x, you can do like this.

import tensorflow as tf with tf.compat.v1.Session() as sess: hello = tf.constant('hello world') print(sess.run(hello)) 

avoid disabling eager execution

For TF2.x, you can do like this.

import tensorflow as tf with tf.compat.v1.Session() as sess: hello = tf.constant('hello world') print(sess.run(hello)) 

>>> b'hello world

Source Link

For TF2.x, you can do like this.

import tensorflow as tf with tf.compat.v1.Session() as sess: hello = tf.constant('hello world') print(sess.run(hello)) 

avoid disabling eager execution