Question - What do you understand by session in TensorFlow?
Answer -
Syntax: Class Session
It is a class for running TensorFlow operations. The environment is encapsulated in the session object wherein the operation objects are executed and Tensor objects are evaluated.
# Build a graph
x = tf.constant(2.0)
y = tf.constant(5.0)
z = x * y
# Launch the graph in a session
sess = tf.Session()
# Evaluate the tensor `z`
print(sess.run(z))