Skip to content
Snippets Groups Projects

Resolve "release v1.4.0"

Merged Ghost User requested to merge release_v1.4.0 into master
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -8,6 +8,7 @@ import math
import pickle
from typing import Union, List
from typing_extensions import TypedDict
from time import time
import numpy as np
from keras import backend as K
@@ -111,6 +112,19 @@ class LearningRateDecay(History):
return K.get_value(self.model.optimizer.lr)
class TimingCallback(Callback):
def __init__(self):
self.logs = []
self.starttime = None
super().__init__()
def on_epoch_begin(self, logs={}):
self.starttime = time()
def on_epoch_end(self, logs={}):
self.logs.append(time()-self.starttime)
class ModelCheckpointAdvanced(ModelCheckpoint):
"""
Enhance the standard ModelCheckpoint class by additional saves of given callbacks.
Loading