Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Simple integration of keras-tuner (hyperparameter tuning) and tensorboard dashboard (interactive visualization).

License

Notifications You must be signed in to change notification settings

tokusumi/kerastuner-tensorboard-logger

Repository files navigation

Keras-tuner Tensorboard logger

PyPI version

Similar feature (hparams integration) is released in keras-tuner (above v1.0.3), so this repo is archived, not developed anymore.

keras-tuner logger for streaming search report to Tensorboard plugins Hparams, beautiful interactive visualization tool.

Requirements

  • Python 3.6+
  • keras-tuner 1.0.0+
  • Tensorboard 2.1+

Installation

$ pip install kerastuner-tensorboard-logger

Example

here is simple (and incomplete) code.

See details about how to use keras-tuner here.

Add only one argument in tuner class and search it, then you can go to see search report in Tensorboard.

Optionally, you can call setup_tb to be more accurate TensorBoard visualization. It convert keras-tuner hyperparameter information and do Tensorboard experimental setup.

# import this
from kerastuner_tensorboard_logger import (
    TensorBoardLogger,
    setup_tb  # Optional
)

tuner = Hyperband(
    build_model,
    objective="val_acc",
    max_epochs=5,
    directory="logs/tuner",
    project_name="tf_test",
    logger=TensorBoardLogger(
        metrics=["val_acc"], logdir="logs/hparams"
    ),  # add only this argument
)

setup_tb(tuner)  # (Optional) For more accurate visualization.
tuner.search(x, y, epochs=5, validation_data=(val_x, val_y))

Tensorboard

$ tensorboard --logdir ./logs/hparams

Go to http://127.0.0.1:6006.

You will see the interactive visualization (provided by Tensorboard).

Table View

Parallel Coordinates View

About

Simple integration of keras-tuner (hyperparameter tuning) and tensorboard dashboard (interactive visualization).

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published