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