  K.set_value(self.model.optimizer.lr, self.base_lr)
        else:
            K.set_value(self.model.optimizer.lr, self.clr())

        self.orig_base_lr = self.base_lr

    def on_batch_end(self, batch, logs=None):
        logs = logs or {}
        self.trn_iterations += 1
        self.clr_iterations += 1

        self.history.setdefault(&#34;lr&#34;, []).append(K.get_value(self.model.optimizer.lr))
        self.history.setdefault(&#34;iterations&#34;, []).append(self.trn_iterations)

        for k, v in 