src/transformers/models/segformer/modeling_tf_segformer.py/TFSegformerModel/serving_output
class TFSegformerModel:    def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput:
        # hidden_states and attention not converted to Tensor with tf.convert_to_tensor as they are all of different dimensions
        return TFBaseModelOutput(
            last_hidden_state=output.last_hidden_state,
            hidden_states=output.hidden_states,
            attentions=output.attentions,
        )