src/transformers/models/unispeech/modeling_unispeech.py/UniSpeechPreTrainedModel/_set_gradient_checkpointing
class UniSpeechPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (UniSpeechEncoder, UniSpeechEncoderStableLayerNorm, UniSpeechFeatureEncoder)):
            module.gradient_checkpointing = value