def _set_loss_and_metric(self) -> None:
    '\n        Create the training loss and metric with their name. Allowed names are those listed\n        in the Tensorflow documentation and those contained in the transformers library.\n        '
    try:
        self.loss = tf.keras.losses.get({'class_name': self.args.loss_name, 'config': {'from_logits': True, 'reduction': tf.keras.losses.Reduction.NONE}})
    except TypeError:
        self.loss = tf.keras.losses.get({'class_name': self.args.loss_name, 'config': {'reduction': tf.keras.losses.Reduction.NONE}})
Create the training loss and metric with their name. Allowed names are those listed
in the Tensorflow documentation and those contained in the transformers library.
def _set_loss_and_metric(self) -> None:
    '\n        Create the training loss and metric with their name. Allowed names are those listed\n        in the Tensorflow documentation and those contained in the transformers library.\n        '
    try:
        self.loss = tf.keras.losses.get({'class_name': self.args.loss_name, 'config': {'from_logits': True, 'reduction': tf.keras.losses.Reduction.NONE}})
    except TypeError:
        self.loss = tf.keras.losses.get({'class_name': self.args.loss_name, 'config': {'reduction': tf.keras.losses.Reduction.NONE}})