def batch_predict(self, batch_in: Union[(Tuple[tf.Tensor], Tuple[np.ndarray])]) -> Dict[(Text, tf.Tensor)]:
    'Predicts the output of the given batch.\n\n        Args:\n            batch_in: The batch.\n\n        Returns:\n            The output to predict.\n        '
    tf_batch_data = self.batch_to_model_data_format(batch_in, self.predict_data_signature)
    sequence_feature_lengths = self._get_sequence_feature_lengths(tf_batch_data, TEXT)
    sentence_feature_lengths = self._get_sentence_feature_lengths(tf_batch_data, TEXT)
    (text_transformed, _, _, _, _, attention_weights) = self._tf_layers[f'sequence_layer.{self.text_name}']((tf_batch_data[TEXT][SEQUENCE], tf_batch_data[TEXT][SENTENCE], sequence_feature_lengths), training=self._training)
    predictions = {DIAGNOSTIC_DATA: {'attention_weights': attention_weights, 'text_transformed': text_transformed}}
    if self.config[INTENT_CLASSIFICATION]:
        predictions.update(self._batch_predict_intents((sequence_feature_lengths + sentence_feature_lengths), text_transformed))
    if self.config[ENTITY_RECOGNITION]:
        predictions.update(self._batch_predict_entities(sequence_feature_lengths, text_transformed))
    return predictions
Predicts the output of the given batch.

Args:
    batch_in: The batch.

Returns:
    The output to predict.
def batch_predict(self, batch_in: Union[(Tuple[tf.Tensor], Tuple[np.ndarray])]) -> Dict[(Text, tf.Tensor)]:
    'Predicts the output of the given batch.\n\n        Args:\n            batch_in: The batch.\n\n        Returns:\n            The output to predict.\n        '
    tf_batch_data = self.batch_to_model_data_format(batch_in, self.predict_data_signature)
    sequence_feature_lengths = self._get_sequence_feature_lengths(tf_batch_data, TEXT)
    sentence_feature_lengths = self._get_sentence_feature_lengths(tf_batch_data, TEXT)
    (text_transformed, _, _, _, _, attention_weights) = self._tf_layers[f'sequence_layer.{self.text_name}']((tf_batch_data[TEXT][SEQUENCE], tf_batch_data[TEXT][SENTENCE], sequence_feature_lengths), training=self._training)
    predictions = {DIAGNOSTIC_DATA: {'attention_weights': attention_weights, 'text_transformed': text_transformed}}
    if self.config[INTENT_CLASSIFICATION]:
        predictions.update(self._batch_predict_intents((sequence_feature_lengths + sentence_feature_lengths), text_transformed))
    if self.config[ENTITY_RECOGNITION]:
        predictions.update(self._batch_predict_entities(sequence_feature_lengths, text_transformed))
    return predictions