src/transformers/models/whisper/modeling_whisper.py/WhisperForAudioClassification/freeze_encoder
class WhisperForAudioClassification:    def freeze_encoder(self):
        """
        Calling this function will disable the gradient computation for the Whisper encoder so that its parameters will
        not be updated during training. Only the projection layers and classification head will be updated.
        """
        self.encoder._freeze_parameters()