Rocketq
Rocketq

Reputation: 5791

How to make it append tensorboard logs to previous runs?

I'm using tensorboard with keras this way:

from keras.callbacks import TensorBoard

tensorboard = TensorBoard(log_dir='./logs', histogram_freq=0,
                          write_graph=True, write_images=False)
# define model
model.fit(X_train, Y_train,
          batch_size=batch_size,
          epochs=nb_epoch,
          validation_data=(X_test, Y_test),
          shuffle=True,
          callbacks=[tensorboard])

If I run train one more time calling second time model.fit(…), tensorboard resets step so metric plots start looking like a mess. How to make it append result to previous results?

Another question how to create another session run to compare their results on tensorboard?

Upvotes: 6

Views: 964

Answers (1)

rvinas
rvinas

Reputation: 11895

To resume a previous training run, you should set the argument initial_epoch of model.fit. By doing so, the new information will be appended to the existing TensorBoard logs.

Upvotes: 5

Related Questions