src/transformers/models/poolformer/modeling_poolformer.py/PoolFormerPreTrainedModel/_set_gradient_checkpointing
class PoolFormerPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, PoolFormerEncoder):
            module.gradient_checkpointing = value