Simple integration of keras-tuner (hyperparameter tuning) and tensorboard dashboard (interactive visualization).
Project description
Keras-tuner Tensorboard logger
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).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kerastuner-tensorboard-logger-0.2.0.tar.gz
.
File metadata
- Download URL: kerastuner-tensorboard-logger-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.9 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce32b22211e7e675d57108621b74cd69057d705ceed76cc49ebb77dfe1963b1 |
|
MD5 | 77edc2258ff7901c46315f7a1c393a67 |
|
BLAKE2b-256 | 8eba9987ef013b7d7a2b477ff9cbdd960280cff0de63751f1feb1b8e8994b876 |
File details
Details for the file kerastuner_tensorboard_logger-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: kerastuner_tensorboard_logger-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.9 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00ecb597fab2a428f52831d3fb1fc012093ba8169ff279f107b916ebfb2a9c1a |
|
MD5 | 7693bce18ea3b4ed80fb57d763794c56 |
|
BLAKE2b-256 | a58b9fcb67d1a31ee7ebee8acdf7b8571157617d38163d734074d624bf712c46 |