How to use Tensorboard callback in Keras?

I'm using Keras 2.1.* and wanted to use Tensorboard for it. How can I use it, when I don't call fit function? I'm using train_on_batch function.

kerastensorboard
2 votesLP190.00
1 Answers
JW234.00
2

You can use the callback as a regular function kind of like this

t_board = keras.callbacks.TensorBoard(
    log_dir='logs/{}'.format(int(time.time())),
    histogram_freq=0,
    batch_size=batch_size,
    write_graph=True,
    write_grads=True,
    write_images=True
)

t_board.set_model(model)

# ...
# during training iteration
t_board.on_epoch_end(epoch, data) # data is a dictionary
Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?