src/transformers/models/convnext/modeling_convnext.py/ConvNextPreTrainedModel/_set_gradient_checkpointing
class ConvNextPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, ConvNextEncoder):
            module.gradient_checkpointing = value