src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py/TFWav2Vec2Model/serving_output
class TFWav2Vec2Model:    def serving_output(self, output):
        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 TFWav2Vec2BaseModelOutput(
            last_hidden_state=output.last_hidden_state,
            extract_features=output.extract_features,
            hidden_states=hidden_states,
            attentions=attentions,
        )