      def __init__(self, optimizer, learning_rate, clipnorm, epsilon, arguments):
          logger.debug("Initializing %s: (optimizer: %s, learning_rate: %s, clipnorm: %s, "
                       "epsilon: %s, arguments: %s)", self.__class__.__name__,
                       optimizer, learning_rate, clipnorm, epsilon, arguments)
          optimizers = {"adam": Adam, "nadam": Nadam, "rms-prop": RMSprop}
          self._optimizer = optimizers[optimizer]
  
          base_kwargs = {"adam": dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon),
                         "nadam": dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon),
                         "rms-prop": dict(epsilon=epsilon)}
          self._kwargs = base_kwargs[optimizer]
  
          self._configure(learning_rate, clipnorm, arguments)
          logger.verbose("Using %s optimizer", optimizer.title())
          logger.debug("Initialized: %s", self.__class__.__name__)
  
 
</s> remove from lib.model import losses
 </s> add from lib.model import losses, optimizers </s> remove     _test_optimizer(k_optimizers.Adam(), target=0.6)
    _test_optimizer(k_optimizers.Adam(decay=1e-3), target=0.6)
 </s> add     _test_optimizer(k_optimizers.Adam(), target=0.5)
    _test_optimizer(k_optimizers.Adam(decay=1e-3), target=0.5)


@pytest.mark.parametrize("dummy", [None], ids=[get_backend().upper()])
def test_adabelief(dummy):  # pylint:disable=unused-argument
    """ Test for custom Adam optimizer """
    _test_optimizer(optimizers.AdaBelief(), target=0.6) </s> remove                  "by zero' errors. Generally this option should be left at default value, however "
                 "if you are getting 'NaN' loss values, and have been unable to resolve the issue "
                 "any other way (for example, increasing batch size, or lowering learning rate, "
                 "then raising the epsilon can lead to a more stable model. It may, however, come "
                 "at the cost of slower training and a less accurate final result.\n"
 </s> add                  "by zero' errors. Unless you are using the AdaBelief Optimizer, then Generally "
                 "this option should be left at default value, For AdaBelief, setting this to "
                 "around '-16' should work.\n"
                 "In all instances if you are getting 'NaN' loss values, and have been unable to "
                 "resolve the issue any other way (for example, increasing batch size, or "
                 "lowering learning rate), then raising the epsilon can lead to a more stable "
                 "model. It may, however, come at the cost of slower training and a less accurate "
                 "final result.\n" </s> remove             min_max=(-10, 0),
 </s> add             min_max=(-20, 0),
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
      def __init__(self, optimizer, learning_rate, clipnorm, epsilon, arguments):
          logger.debug("Initializing %s: (optimizer: %s, learning_rate: %s, clipnorm: %s, "
                       "epsilon: %s, arguments: %s)", self.__class__.__name__,
                       optimizer, learning_rate, clipnorm, epsilon, arguments)
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
        valid_optimizers = {"adabelief": (optimizers.AdaBelief,
                                          dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "adam": (Adam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "nadam": (Nadam, dict(beta_1=0.5, beta_2=0.99, epsilon=epsilon)),
                            "rms-prop": (RMSprop, dict(epsilon=epsilon))}
        self._optimizer, self._kwargs = valid_optimizers[optimizer]
  
          self._configure(learning_rate, clipnorm, arguments)
          logger.verbose("Using %s optimizer", optimizer.title())
          logger.debug("Initialized: %s", self.__class__.__name__)
  
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 lib.model - Add AdaBelief Optimizer 
plugins/train/model/_base.py