src/transformers/models/trocr/modeling_trocr.py/TrOCRPreTrainedModel/_set_gradient_checkpointing
class TrOCRPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, TrOCRDecoder):
            module.gradient_checkpointing = value