xxxxxxxxxx
import tensorflow as tf
# Create a summary writer
summary_writer = tf.summary.create_file_writer(logdir='logs')
# Log scalar values using tf.summary.scalar
with summary_writer.as_default():
tf.summary.scalar('loss', loss_value, step=epoch)
tf.summary.scalar('accuracy', accuracy_value, step=epoch)
'Value' has been replaced by scalar in the newer versions