src/transformers/models/visual_bert/modeling_visual_bert.py/VisualBertPreTrainedModel/_set_gradient_checkpointing
class VisualBertPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, VisualBertEncoder):
            module.gradient_checkpointing = value