Callbacks
VAE.callbacks
Collection of callbacks for model training.
VAE.callbacks.ModelCheckpoint
ModelCheckpoint(filepath, period=1, **kwargs)
Bases: ModelCheckpoint
Callback to save the Keras model or model weights at some frequency.
Prevents deprecation warning in super class when period is used.
Parameters:
-
period
(int
, default:1
) –Number of epochs between checkpoints.
-
**kwargs
–Additional keyword arguments to be passed to
keras.callbacks.ModelCheckpoint
.
Source code in VAE/callbacks.py
21 22 23 |
|
VAE.callbacks.Evaluate
Evaluate(x=None, y=None, batch_size=None, verbose=0, sample_weight=None, prefix='val2_', **kwargs)
Bases: Callback
Callback to evaluate the model.
This callbacks evaluates the model on the given data at the end of each epoch. For a detailed description of
the input and target data see the Keras documentation for :func:keras.Model.evaluate
.
With this callback, further validation datasets can be evaluated during training. The prefix is used to identify
the metrics in the logs and should be unique for each validation dataset. The prefix cannot be empty of val_
.
This would cause training metrics to be overwritten.
Parameters:
-
x
–Input data.
-
y
–Target data.
-
batch_size
(int
, default:None
) –Number of samples per batch.
-
verbose
(int
, default:0
) –Verbosity mode.
-
sample_weight
–Sample weights.
-
prefix
(str
, default:'val2_'
) –Prefix for the metric names. Defaults to 'val2_'.
-
**kwargs
–Additional keyword arguments to be passed to
keras.callbacks.Callback
.
Raises:
-
ValueError
–If the prefix is empty or
val_
.
Source code in VAE/callbacks.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|