torch.utils.checkpoint — PyTorch 1.10 documentation
pytorch.org › docs › stabletorch.utils.checkpoint. checkpoint (function, * args, ** kwargs) [source] ¶ Checkpoint a model or part of the model. Checkpointing works by trading compute for memory. Rather than storing all intermediate activations of the entire computation graph for computing backward, the checkpointed part does not save intermediate activations, and instead recomputes them in backward pass.