Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorboard in Colab: No dashboards are active for the current data set

I am trying to display a Tensorboard in Google Colab. I import tensorboard: %load_ext tensorboard, then create a log_dir, and fit it as follows:

log_dir = '/gdrive/My Drive/project/' + "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)

history = model.fit_generator(
    train_generator,
    steps_per_epoch=nb_train_samples // batch_size,
    epochs=epochs,
    validation_data=validation_generator,
    validation_steps=nb_validation_samples // batch_size,
    callbacks=[tensorboard_callback])

But when I call it with %tensorboard --logdir logs/fit it doesn't display. Instead, it throws the following message:

No dashboards are active for the current data set.

Is there a solution for this? is the problem in the fixed path I passed in log_dir?

like image 399
Liz Avatar asked Nov 26 '25 11:11

Liz


1 Answers

Please try the below code

log_dir = '/gdrive/My Drive/project/' + "logs/fit/"
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)

history = model.fit_generator(
    train_generator,
    steps_per_epoch=nb_train_samples // batch_size,
    epochs=epochs,
    validation_data=validation_generator,
    validation_steps=nb_validation_samples // batch_size,
    callbacks=[tensorboard_callback])

    %load_ext tensorboard
    %tensorboard --logdir /gdrive/My Drive/project/logs/fit/
like image 153
bsquare Avatar answered Nov 28 '25 23:11

bsquare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!