Skip to content

Instantly share code, notes, and snippets.

@sgodfrey66
Created June 17, 2020 00:46
Show Gist options
  • Save sgodfrey66/09ab4af36fae1a2fd3491ff3ed081ed0 to your computer and use it in GitHub Desktop.
Save sgodfrey66/09ab4af36fae1a2fd3491ff3ed081ed0 to your computer and use it in GitHub Desktop.
# Create a callback for TensorBoard and put it in a list
callbacks=[tf.keras.callbacks.TensorBoard(log_dir=model_log,
histogram_freq=1,
write_graph=True,
write_images=False,
update_freq='epoch')]
# Create the TensorBoard writer for the confusion matrix writer
cm_file_writer=tf.summary.create_file_writer(logdir=cm_log)
# Add confusion matrix call back to the list of callbacks
callbacks.append(keras.callbacks.LambdaCallback(on_epoch_end=cm_logger))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment