checkpoint.pyi 444 Bytes
Newer Older
Tom Birch's avatar
Tom Birch committed
1
2
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.

3
from typing import Any, Iterable, Tuple
Tom Birch's avatar
Tom Birch committed
4
from .. import Tensor
5
from torch.nn.modules.module import Module
Tom Birch's avatar
Tom Birch committed
6
7

def detach_variable(inputs: Tuple[Tensor,...]) -> Tuple[Tensor,...]: ...
8
def checkpoint(function: Module, *args, **kwargs): ...
9
def check_backward_validity(inputs: Iterable[Any]): ...
10
def checkpoint_sequential(function: Module, segments: int, *args, **kwargs): ...