src/transformers/models/swin/modeling_tf_swin.py/TFSwinForMaskedImageModeling/serving_output
class TFSwinForMaskedImageModeling:    def serving_output(self, output: TFSwinMaskedImageModelingOutput) -> TFSwinMaskedImageModelingOutput:
        # hidden_states and attentions not converted to Tensor with tf.convert_to_tensor as they are all of different dimensions
        return TFSwinMaskedImageModelingOutput(
            logits=output.logits,
            hidden_states=output.hidden_states,
            attentions=output.attentions,
            reshaped_hidden_states=output.reshaped_hidden_states,
        )