src/transformers/models/clipseg/modeling_clipseg.py/CLIPSegPreTrainedModel/_set_gradient_checkpointing
class CLIPSegPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, CLIPSegEncoder):
            module.gradient_checkpointing = value