Keras utils

Utility classes related to Keras.

KerasMixin

KerasMixin.create_model(input_shape) Create sequential Keras model
KerasMixin.create_callback_list() Create list of Keras callbacks
KerasMixin.create_external_metric_evaluators() Create external metric evaluators
KerasMixin.prepare_data(data, files[, processor]) Concatenate feature data into one feature matrix
KerasMixin.prepare_activity(...[, processor]) Concatenate activity matrices into one activity matrix
KerasMixin.keras_model_exists() Check that keras model exists on disk
KerasMixin.log_model_summary() Prints model summary to the logging interface.
KerasMixin.plot_model([filename, ...]) Plots model topology
KerasMixin.get_processing_interval() Processing interval

BaseCallback

BaseCallback(\*args, \*\*kwargs) Base class for Callbacks

ProgressLoggerCallback

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).

ProgressLoggerCallback(\*args, \*\*kwargs) Keras callback to store metrics with tqdm progress bar or logging interface.

ProgressPlotterCallback

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

ProgressPlotterCallback(\*args, \*\*kwargs) Keras callback to plot progress during the training process and save final progress into figure.

StopperCallback

Keras callback to stop training when improvement has not seen in specified amount of epochs. Implements Keras Callback API.

This Callback is very similar to standard EarlyStopping Keras callback, however it adds support for external metrics (metrics calculated outside Keras training process).

StopperCallback(\*args, \*\*kwargs) Keras callback to stop training when improvement has not seen in specified amount of epochs.

StasherCallback

Keras callback to monitor training process and store best model. Implements Keras Callback API.

This callback is very similar to standard ModelCheckpoint Keras callback, however it adds support for external metrics (metrics calculated outside Keras training process).

StasherCallback(\*args, \*\*kwargs) Keras callback to monitor training process and store best model.

BaseDataGenerator

BaseDataGenerator(\*args, \*\*kwargs) Base class for data generator.
BaseDataGenerator.input_size Length of input feature vector
BaseDataGenerator.data_size Total data amount
BaseDataGenerator.steps_count Number of batches in one epoch
BaseDataGenerator.info() Information logging

FeatureGenerator

FeatureGenerator(\*args, \*\*kwargs) Feature data generator
FeatureGenerator.generator() Generator method