def _calculate_label_loss(self, text_features: tf.Tensor, label_features: tf.Tensor, label_ids: tf.Tensor) -> tf.Tensor:
    (all_label_ids, all_labels_embed) = self._create_all_labels()
    text_embed = self._tf_layers[f'embed.{TEXT}'](text_features)
    label_embed = self._tf_layers[f'embed.{LABEL}'](label_features)
    return self._tf_layers[f'loss.{LABEL}'](text_embed, label_embed, label_ids, all_labels_embed, all_label_ids)
def _calculate_label_loss(self, text_features: tf.Tensor, label_features: tf.Tensor, label_ids: tf.Tensor) -> tf.Tensor:
    (all_label_ids, all_labels_embed) = self._create_all_labels()
    text_embed = self._tf_layers[f'embed.{TEXT}'](text_features)
    label_embed = self._tf_layers[f'embed.{LABEL}'](label_features)
    return self._tf_layers[f'loss.{LABEL}'](text_embed, label_embed, label_ids, all_labels_embed, all_label_ids)