src/transformers/models/vit_mae/modeling_tf_vit_mae.py/TFViTMAEForPreTraining/serving_output
class TFViTMAEForPreTraining:    def serving_output(self, output: TFViTMAEForPreTrainingOutput) -> TFViTMAEForPreTrainingOutput:
        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 TFViTMAEForPreTrainingOutput(
            logits=output.logits,
            mask=output.mask,
            ids_restore=output.ids_restore,
            hidden_states=hidden_states,
            attentions=attentions,
        )