File: _nn.pyi.in

package info (click to toggle)
pytorch 1.13.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 139,252 kB
  • sloc: cpp: 1,100,274; python: 706,454; ansic: 83,052; asm: 7,618; java: 3,273; sh: 2,841; javascript: 612; makefile: 323; xml: 269; ruby: 185; yacc: 144; objc: 68; lex: 44
file content (36 lines) | stat: -rw-r--r-- 1,728 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from torch import Tensor, memory_format
from typing import Callable, Optional, List, overload, Tuple
from torch.types import _bool, _dtype, _device

# Defined in tools/autograd/templates/python_nn_functions.cpp

${dispatched_hints}

# Defined in aten/src/ATen/native/mkldnn/Linear.cpp
def mkldnn_linear(input: Tensor, weight: Tensor, bias: Optional[Tensor]) -> Tensor: ...

# Defined at aten/src/ATen/native/mkldnn/MKLDNNConversions.cpp
def mkldnn_reorder_conv2d_weight(self: Tensor, padding: List, stride: List, dilatation: List, groups: int) -> Tensor: ...
def mkldnn_reorder_conv3d_weight(self: Tensor, padding: List, stride: List, dilatation: List, groups: int) -> Tensor: ...

# Defined in aten/src/ATen/native/mkldnn/Prelu.cpp
def mkldnn_prelu(input: Tensor, weight: Tensor) -> Tensor: ...

# Defined at tools/autograd/templates/python_nn_functions.cpp
@overload
def _parse_to(device: _device, dtype: _dtype, non_blocking: _bool, copy: _bool, *,
              memory_format: memory_format) -> Tuple[_device, _dtype, _bool, memory_format]: ...
@overload
def _parse_to(dtype: _dtype, non_blocking: _bool, copy: _bool, *,
              memory_format: memory_format) -> Tuple[_device, _dtype, _bool, memory_format]: ...
@overload
def _parse_to(tensor: Tensor, non_blocking: _bool, copy: _bool, *,
              memory_format: memory_format) -> Tuple[_device, _dtype, _bool, memory_format]: ...

# Defined in aten/src/ATen/naitve/PadSequence.cpp
def pad_sequence(sequences: List[Tensor], batch_first: bool = False,
                 padding_value: float = ...) -> Tensor: ...

def flatten_dense_tensors(tensors: List[Tensor]) -> Tensor: ...

def unflatten_dense_tensors(flat: Tensor, tensors: List[Tensor]) -> List[Tensor]: ...