src/transformers/models/hubert/modeling_tf_hubert.py/TFHubertModel/serving_output
class TFHubertModel:    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 TFBaseModelOutput(
            last_hidden_state=output.last_hidden_state, hidden_states=hidden_states, attentions=attentions
        )