Skip to content

Instantly share code, notes, and snippets.

@thoolihan
Created July 13, 2018 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thoolihan/6f0ec761402b94fa63fd0df151f9740d to your computer and use it in GitHub Desktop.
Save thoolihan/6f0ec761402b94fa63fd0df151f9740d to your computer and use it in GitHub Desktop.
Example of tensorboard callback
from shared.get_start_time get_start_time, get_curr_time
# the tensorboard log directory will be a unique subdirectory based on the start time fo the run
TBLOGDIR="/tmp/myproject/{}".format(get_start_time())
# ...your model code here...
history = model.fit(train_images,
train_images,
epochs=EPOCHS,
batch_size=BATCH_SIZE,
shuffle=True,
validation_data=(test_images, test_images),
callbacks=[TensorBoard(log_dir=TBLOGDIR)])
# run in another terminal `tensorboard --logdir=/tmp/myproject`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment