def _batch_loss_intent(self, combined_sequence_sentence_feature_lengths_text: tf.Tensor, text_transformed: tf.Tensor, tf_batch_data: Dict[(Text, Dict[(Text, List[tf.Tensor])])]) -> tf.Tensor:
    sentence_vector = self._last_token(text_transformed, combined_sequence_sentence_feature_lengths_text)
    sequence_feature_lengths_label = self._get_sequence_feature_lengths(tf_batch_data, LABEL)
    label_ids = tf_batch_data[LABEL_KEY][LABEL_SUB_KEY][0]
    label = self._create_bow(tf_batch_data[LABEL][SEQUENCE], tf_batch_data[LABEL][SENTENCE], sequence_feature_lengths_label, self.label_name)
    (loss, acc) = self._calculate_label_loss(sentence_vector, label, label_ids)
    self._update_label_metrics(loss, acc)
    return loss
def _batch_loss_intent(self, combined_sequence_sentence_feature_lengths_text: tf.Tensor, text_transformed: tf.Tensor, tf_batch_data: Dict[(Text, Dict[(Text, List[tf.Tensor])])]) -> tf.Tensor:
    sentence_vector = self._last_token(text_transformed, combined_sequence_sentence_feature_lengths_text)
    sequence_feature_lengths_label = self._get_sequence_feature_lengths(tf_batch_data, LABEL)
    label_ids = tf_batch_data[LABEL_KEY][LABEL_SUB_KEY][0]
    label = self._create_bow(tf_batch_data[LABEL][SEQUENCE], tf_batch_data[LABEL][SENTENCE], sequence_feature_lengths_label, self.label_name)
    (loss, acc) = self._calculate_label_loss(sentence_vector, label, label_ids)
    self._update_label_metrics(loss, acc)
    return loss