Announcing the TensorFlow Dev Summit 2020 Learn more

tfa.callbacks.TQDMProgressBar

View source on GitHub

Class TQDMProgressBar

TQDM Progress Bar for Tensorflow Keras.

Aliases: tfa.callbacks.tqdm_progress_bar.TQDMProgressBar

Arguments:

metrics_separator (string): Custom separator between metrics. Defaults to ' - ' overall_bar_format (string format): Custom bar format for overall (outer) progress bar, see https://github.com/tqdm/tqdm#parameters for more detail. epoch_bar_format (string format): Custom bar format for epoch (inner) progress bar, see https://github.com/tqdm/tqdm#parameters for more detail. update_per_second (int): Maximum number of updates in the epochs bar per second, this is to prevent small batches from slowing down training. Defaults to 10. leave_epoch_progress (bool): True to leave epoch progress bars leave_overall_progress (bool): True to leave overall progress bar show_epoch_progress (bool): False to hide epoch progress bars show_overall_progress (bool): False to hide overall progress bar

__init__

View source

__init__(
    metrics_separator=' - ',
    overall_bar_format='{l_bar}{bar} {n_fmt}/{total_fmt} ETA: {remaining}s,  {rate_fmt}{postfix}',
    epoch_bar_format='{n_fmt}/{total_fmt}{bar} ETA: {remaining}s - {desc}',
    update_per_second=10,
    leave_epoch_progress=True,
    leave_overall_progress=True,
    show_epoch_progress=True,
    show_overall_progress=True
)

Initialize self. See help(type(self)) for accurate signature.

Methods

format_metrics

View source

format_metrics(
    logs={},
    factor=1
)

Format metrics in logs into a string.

Arguments:

  • logs: dictionary of metrics and their values. Defaults to empty dictionary. factor (int): The factor we want to divide the metrics in logs by, useful when we are computing the logs after each batch. Defaults to 1.

Returns:

  • metrics_string: a string displaying metrics using the given formators passed in through the constructor.

get_config

View source

get_config()

set_model

set_model(model)

set_params

set_params(params)