dcase_framework.keras_utils.ProgressLoggerCallback¶
-
class
dcase_framework.keras_utils.
ProgressLoggerCallback
(*args, **kwargs)[source]¶ Keras callback to store metrics with tqdm progress bar or logging interface. Implements Keras Callback API.
This callback is very similar to standard
ProgbarLogger
Keras callback, however it adds support for logging interface and tqdm based progress bars, and external metrics (metrics calculated outside Keras training process).Constructor
Parameters: epochs : int
Total amount of epochs
metric : str
Metric name
manual_update : bool
Manually update callback, use this to when injecting external metrics Default value True
manual_update_interval : int
Epoch interval for manual update, used anticipate updates Default value 1
disable_progress_bar : bool
Disable tqdm based progress bar Default value False
close_progress_bar : bool
Close tqdm progress bar on training end Default value True
log_progress : bool
Print progress into logging interface Default value False
external_metric_labels : dict or OrderedDict
Dictionary with
-
__init__
(*args, **kwargs)[source]¶ Constructor
Parameters: epochs : int
Total amount of epochs
metric : str
Metric name
manual_update : bool
Manually update callback, use this to when injecting external metrics Default value True
manual_update_interval : int
Epoch interval for manual update, used anticipate updates Default value 1
disable_progress_bar : bool
Disable tqdm based progress bar Default value False
close_progress_bar : bool
Close tqdm progress bar on training end Default value True
log_progress : bool
Print progress into logging interface Default value False
external_metric_labels : dict or OrderedDict
Dictionary with
Methods
__init__
(\*args, \*\*kwargs)Constructor add_external_metric
(metric_id)Add external metric to be monitored close
()Manually close progress logging get_operator
(metric)on_batch_begin
(batch[, logs])on_batch_end
(batch[, logs])on_epoch_begin
(epoch[, logs])on_epoch_end
(epoch[, logs])on_train_begin
([logs])on_train_end
([logs])set_external_metric_value
(metric_label, ...)Add external metric value set_model
(model)set_params
(params)update
()Update update_progress_bar
([increase])Update progress to tqdm progress bar update_progress_log
()Update progress to logging interface -