Enable the eager execution which is introduced in tensorflow after version 1.10.
It's very easy to use.
# Initialize session
import tensorflow as tf
tf.enable_eager_execution()
# Some tensor we want to print the value of
a = tf.constant([1.0, 3.0])
print(a)