# tensorplay.utils.checkpoint.checkpoint

Source: https://www.tensorplay.cn/docs/generated/tensorplay.utils.checkpoint.checkpoint.html

# tensorplay.utils.checkpoint.checkpoint

tensorplay.utils.checkpoint.checkpoint(function: [Callable](https://docs.python.org/3/library/typing.html#typing.Callable)[[...], [Any](https://docs.python.org/3/library/typing.html#typing.Any)], *args: [Any](https://docs.python.org/3/library/typing.html#typing.Any), use_reentrant: [bool](https://docs.python.org/3/library/functions.html#bool) = True, context_fn: [Callable](https://docs.python.org/3/library/typing.html#typing.Callable)[[], [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/library/constants.html#None) = None, determinism_check: [str](https://docs.python.org/3/library/stdtypes.html#str) = 'default', debug: [bool](https://docs.python.org/3/library/functions.html#bool) = False, **kwargs: [Any](https://docs.python.org/3/library/typing.html#typing.Any)) &#x2192; [Any](https://docs.python.org/3/library/typing.html#typing.Any)[[source]](../_modules/tensorplay/utils/checkpoint.html#checkpoint)

Runs function(*args, **kwargs) eagerly (no recomputation).

Mirrors torch.utils.checkpoint.checkpoint’s signature; emits a warning
once when grad is enabled because backward will re-run the graph normally.
