Skip to content

Instantly share code, notes, and snippets.

@nanmi
Last active January 13, 2021 08:24
Show Gist options
  • Save nanmi/70a602e7090fc528c88853b19cb0f45a to your computer and use it in GitHub Desktop.
Save nanmi/70a602e7090fc528c88853b19cb0f45a to your computer and use it in GitHub Desktop.
tensorboard check loss or accuracy
summary_writer = tf.summary.FileWriter('./logs', sess.graph)
train_summary = tf.Summary(value=[tf.Summary.Value(tag='train_loss', simple_value=train_loss),
tf.Summary.Value(tag='train_accuracy', simple_value=train_acc)
])
test_acc, test_loss, test_summary = Evaluate(sess)
summary_writer.add_summary(summary=train_summary, global_step=epoch)
summary_writer.add_summary(summary=test_summary, global_step=epoch)
summary_writer.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment