Allow callbacks to override their model.
@@ -45,6 +45,7 @@ class CallbackList(object):
def set_model(self, model):
for callback in self.callbacks:
+ if callback.model is None:
callback.set_model(model)
def on_epoch_begin(self, epoch, logs=None):
@@ -168,6 +169,7 @@ class Callback(object):
def __init__(self):
self.validation_data = None
+ self.model = None
def set_params(self, params):
self.params = params
