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