I am trying to record the status of each epochs used in Keras using callback feature of keras. This is the sample code of callback class
class TimingCallback():
def __init__(self):
self.logs=[]
def on_epoch_begin(epoch, logs={}):
self.starttime=time()
def on_epoch_end(epoch, logs={}):
self.logs.append(time()-self.starttime)
This is my model fit.
cb = TimingCallback()
model.fit(X, Y, epochs=150, batch_size=10, callbacks=[cb])
While executing i get the following error.
Error:
AttributeError: TimingCallback instance has no attribute 'set_model'
Can anyone help me to figure out why exactly this is happening?