src/transformers/models/layoutlmv2/modeling_layoutlmv2.py/LayoutLMv2PreTrainedModel/_set_gradient_checkpointing
class LayoutLMv2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, LayoutLMv2Encoder):
            module.gradient_checkpointing = value