src/transformers/models/informer/modeling_informer.py/InformerPreTrainedModel/_set_gradient_checkpointing
class InformerPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (InformerDecoder, InformerEncoder)):
            module.gradient_checkpointing = value