src/transformers/models/yolos/modeling_yolos.py/YolosPreTrainedModel/_set_gradient_checkpointing
class YolosPreTrainedModel:    def _set_gradient_checkpointing(self, module: YolosEncoder, value: bool = False) -> None:
        if isinstance(module, YolosEncoder):
            module.gradient_checkpointing = value