src/transformers/models/tapas/modeling_tf_tapas.py/TFTapasForQuestionAnswering/serving_output
class TFTapasForQuestionAnswering:    def serving_output(self, output: TFTableQuestionAnsweringOutput) -> TFTableQuestionAnsweringOutput:
        hidden_states = tf.convert_to_tensor(output.hidden_states) if self.config.output_hidden_states else None
        attentions = tf.convert_to_tensor(output.attentions) if self.config.output_attentions else None

        return TFTableQuestionAnsweringOutput(
            logits=output.logits,
            logits_aggregation=output.logits_aggregation,
            hidden_states=hidden_states,
            attentions=attentions,
        )