Here, we have to invoke a variable initializer operation to initialize all variables.
# Create the operation for initializing all variables
init = tf.global_variables_initializer()
# Merge all summaries into a single operator
merged_summary_op = tf.summary.merge_all()