Checkpoint a model or part of the model. This has been directly copied from torch.utils.checkpoint.
(function, *args)
| 314 | |
| 315 | |
| 316 | def checkpoint(function, *args): |
| 317 | """Checkpoint a model or part of the model. |
| 318 | This has been directly copied from torch.utils.checkpoint.""" |
| 319 | return CheckpointFunction.apply(function, *args) |