src/transformers/models/upernet/modeling_upernet.py/UperNetPreTrainedModel/_set_gradient_checkpointing
class UperNetPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, BackboneMixin):
            module.gradient_checkpointing = value