|
def | __init__ (self, filepath, base_model, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', period=1) |
|
def | on_epoch_end (self, epoch, logs=None) |
|
Definition at line 7 of file my_callbacks.py.
def my_callbacks.MultiGPUCheckpointCallback.__init__ |
( |
|
self, |
|
|
|
filepath, |
|
|
|
base_model, |
|
|
|
monitor = 'val_loss' , |
|
|
|
verbose = 0 , |
|
|
|
save_best_only = False , |
|
|
|
save_weights_only = False , |
|
|
|
mode = 'auto' , |
|
|
|
period = 1 |
|
) |
| |
Definition at line 11 of file my_callbacks.py.
11 mode=
'auto', period=1):
12 super(MultiGPUCheckpointCallback, self).
__init__()
22 if mode
not in [
'auto',
'min',
'max']:
23 warnings.warn(
'ModelCheckpoint mode %s is unknown, ' 24 'fallback to auto mode.' % (mode),
35 if 'acc' in self.
monitor or self.monitor.startswith(
'fmeasure'):
def __init__(self, filepath, base_model, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', period=1)
def my_callbacks.MultiGPUCheckpointCallback.on_epoch_end |
( |
|
self, |
|
|
|
epoch, |
|
|
|
logs = None |
|
) |
| |
Definition at line 42 of file my_callbacks.py.
48 filepath = self.filepath.format(epoch=epoch + 1, **logs)
50 current = logs.get(self.
monitor)
52 warnings.warn(
'Can save best model only with %s available, ' 53 'skipping.' % (self.
monitor), RuntimeWarning)
57 print(
'Epoch %05d: %s improved from %0.5f to %0.5f,' 63 self.base_model.save_weights(filepath, overwrite=
True)
65 self.base_model.save(filepath, overwrite=
True)
68 print(
'Epoch %05d: %s did not improve' %
72 print(
'Epoch %05d: saving model to %s' % (epoch + 1, filepath))
74 self.base_model.save_weights(filepath, overwrite=
True)
76 self.base_model.save(filepath, overwrite=
True)
def on_epoch_end(self, epoch, logs=None)
my_callbacks.MultiGPUCheckpointCallback.base_model |
my_callbacks.MultiGPUCheckpointCallback.best |
my_callbacks.MultiGPUCheckpointCallback.epochs_since_last_save |
my_callbacks.MultiGPUCheckpointCallback.filepath |
my_callbacks.MultiGPUCheckpointCallback.monitor |
my_callbacks.MultiGPUCheckpointCallback.monitor_op |
my_callbacks.MultiGPUCheckpointCallback.period |
my_callbacks.MultiGPUCheckpointCallback.save_best_only |
my_callbacks.MultiGPUCheckpointCallback.save_weights_only |
my_callbacks.MultiGPUCheckpointCallback.verbose |
The documentation for this class was generated from the following file: