dcase_util.keras.ProgressPlotterCallback

class dcase_util.keras.ProgressPlotterCallback(epochs=None, manual_update=False, external_metric_labels=None, metric=None, loss=None, filename=None, plotting_rate=10, interactive=True, save=False, focus_span=10, **kwargs)[source]

Keras callback to plot progress during the training process and save final progress into figure. Implements Keras Callback API.

Constructor

Parameters
epochsint

Total amount of epochs Default value None

metricstr

Metric name Default value None

manual_updatebool

Manually update callback, use this to when injecting external metrics Default value False

interactivebool

Show plot during the training and update with plotting rate Default value True

plotting_rateint

Plot update rate in seconds Default value 10

savebool

Save plot on disk, plotting rate applies Default value False

filenamestr

Filename of figure Default value None

focus_spanint

Epoch amount to highlight, and show separately in the plot. Default value 10

__init__(epochs=None, manual_update=False, external_metric_labels=None, metric=None, loss=None, filename=None, plotting_rate=10, interactive=True, save=False, focus_span=10, **kwargs)[source]

Constructor

Parameters
epochsint

Total amount of epochs Default value None

metricstr

Metric name Default value None

manual_updatebool

Manually update callback, use this to when injecting external metrics Default value False

interactivebool

Show plot during the training and update with plotting rate Default value True

plotting_rateint

Plot update rate in seconds Default value 10

savebool

Save plot on disk, plotting rate applies Default value False

filenamestr

Filename of figure Default value None

focus_spanint

Epoch amount to highlight, and show separately in the plot. Default value 10

Methods

__init__([epochs, manual_update, ...])

Constructor

add_external_metric(metric_label)

Add external metric to be monitored

close()

Manually close progress logging

draw()

Draw plot

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_log()

Update progress to logging interface

Attributes

logger