src/transformers/models/flava/modeling_flava.py/FlavaPreTrainedModel/_set_gradient_checkpointing
class FlavaPreTrainedModel:    def _set_gradient_checkpointing(self, module: FlavaEncoder, value: bool = False) -> None:
        if isinstance(module, FlavaEncoder):
            module.gradient_checkpointing = value