pytorch

Форк
0
/
_distributed_autograd.pyi 
27 строк · 918.0 Байт
1
# mypy: allow-untyped-defs
2
from typing import Any
3

4
import torch
5

6
# This module is defined in torch/csrc/distributed/autograd/init.cpp
7

8
class DistAutogradContext:
9
    def _context_id(self) -> int: ...
10
    def _recv_functions(self) -> dict[int, Any]: ...
11
    def _send_functions(self) -> dict[int, Any]: ...
12
    def _known_worker_ids(self) -> set[int]: ...
13

14
def _new_context() -> DistAutogradContext: ...
15
def _release_context(context_id: int) -> None: ...
16
def _get_max_id() -> int: ...
17
def _is_valid_context(worker_id: int) -> bool: ...
18
def _retrieve_context(context_id: int) -> DistAutogradContext: ...
19
def _current_context() -> DistAutogradContext: ...
20
def _init(worker_id: int) -> None: ...
21
def _get_debug_info() -> dict[str, str]: ...
22
def backward(
23
    context_id: int,
24
    roots: list[torch.Tensor],
25
    retain_graph=False,
26
) -> None: ...
27
def get_gradients(context_id: int) -> dict[torch.Tensor, torch.Tensor]: ...
28

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.