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