_end(self, epoch, logs=None):
    # print(K.eval(self.model.optimizer.lr))

    # Stop training if training loss becomes zero or negative
    # to address bug in keras_contrib code for CRF.
    # We restore the weights from previous best epoch
    # rather than this epoch.
    crf = U.is_crf(self.model)
    if crf:
        current_loss = logs.get(&#34;loss&#34;)
        current_val_loss = logs.get(&#34;val_loss&#34;, None)
        if (current_loss is not None and current_loss &lt;= 0.0) or (
            cur