src/transformers/models/swin/modeling_tf_swin.py/TFSwinPreTrainedModel/_set_gradient_checkpointing
class TFSwinPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False) -> None:
        if isinstance(module, TFSwinEncoder):
            module.gradient_checkpointing = value