2.5 KiB
title |
---|
Keras with TensorBoard |
The example below demonstrates the integration of ClearML into code which uses Keras and TensorBoard. View it in script or in Jupyter Notebook.
:::note The example in Jupyter Notebook includes a clickable icon to open the notebook in Google Colab. :::
The example script does the following:
- Trains a simple deep neural network on the Keras built-in MNIST dataset.
- Builds a sequential model using a categorical cross entropy loss objective function.
- Specifies accuracy as the metric, and uses two callbacks: a TensorBoard callback and a model checkpoint callback.
- During script execution, creates an experiment named
Keras with TensorBoard example
, which is associated with theexamples
project (in script) or theColab notebooks
project (in Jupyter Notebook) .
Scalars
The loss and accuracy metric scalar plots appear in RESULTS > SCALARS, along with the resource utilization plots, which are titled :monitor: machine.
Histograms
Histograms for layer density appear in RESULTS > PLOTS.
Hyperparameters
ClearML automatically logs command line options generated with argparse
, and TensorFlow Definitions.
Command line options appear in CONFIGURATIONS > HYPER PARAMETERS > Args.
TensorFlow Definitions appear in TF_DEFINE.
Console
Text printed to the console for training progress, as well as all other console output, appear in RESULTS > CONSOLE.
Configuration Objects
In the experiment code, a configuration dictionary is connected to the Task by calling the Task.connect method.
task.connect_configuration({'test': 1337, 'nested': {'key': 'value', 'number': 1}})
It appears in CONFIGURATIONS > CONFIGURATION OBJECTS > General.