nt is None:
            raise Exception(&#34;cannot monitor %s&#34; % (self.monitor))
        if self.monitor_op(current, self.best):
            self.best = current
            self.wait = 0
            if crf:
                self.best_weights = self.model.get_weights()
        else:
            self.wait += 1
            if self.wait &gt;= self.patience:
                min_lr = 1e-7
                current_lr = float(K.get_value(self.model.optimizer.lr))
                if self.max_lr &gt; min_lr:
     