src/transformers/models/swinv2/modeling_swinv2.py/Swinv2PreTrainedModel/_set_gradient_checkpointing
class Swinv2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, Swinv2Encoder):
            module.gradient_checkpointing = value