def _create_optimizer(self) -> None:
    '\n        Create the training optimizer with its name. Allowed names are those listed\n        in the Tensorflow documentation and those contained in the transformers library.\n        '
    if (self.args.optimizer_name == 'adamw'):
        self.optimizer = create_optimizer(self.args.learning_rate, self.train_steps, self.args.warmup_steps, self.args.end_lr)
    else:
        try:
            self.optimizer = tf.keras.optimizers.get({'class_name': self.args.optimizer_name, 'config': {'learning_rate': self.args.learning_rate, 'epsilon': self.args.adam_epsilon}})
        except TypeError:
            self.optimizer = tf.keras.optimizers.get({'class_name': self.args.optimizer_name, 'config': {'learning_rate': self.args.learning_rate}})
    logger.info('Created an/a {} optimizer'.format(self.args.optimizer_name))
Create the training optimizer with its name. Allowed names are those listed
in the Tensorflow documentation and those contained in the transformers library.
def _create_optimizer(self) -> None:
    '\n        Create the training optimizer with its name. Allowed names are those listed\n        in the Tensorflow documentation and those contained in the transformers library.\n        '
    if (self.args.optimizer_name == 'adamw'):
        self.optimizer = create_optimizer(self.args.learning_rate, self.train_steps, self.args.warmup_steps, self.args.end_lr)
    else:
        try:
            self.optimizer = tf.keras.optimizers.get({'class_name': self.args.optimizer_name, 'config': {'learning_rate': self.args.learning_rate, 'epsilon': self.args.adam_epsilon}})
        except TypeError:
            self.optimizer = tf.keras.optimizers.get({'class_name': self.args.optimizer_name, 'config': {'learning_rate': self.args.learning_rate}})
    logger.info('Created an/a {} optimizer'.format(self.args.optimizer_name))