-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtftensor_core.pyi
68 lines (63 loc) · 3.04 KB
/
tftensor_core.pyi
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from typing import List, NewType, Union, Any, Optional, Tuple, TypeVar
class Tensor_f32(TensorType): ...
class Tensor_f64(TensorType): ...
class Tensor_u8(TensorType): ...
class Tensor_u16(TensorType): ...
class Tensor_u32(TensorType): ...
class Tensor_u64(TensorType): ...
class Tensor_i8(TensorType): ...
class Tensor_i16(TensorType): ...
class Tensor_i32(TensorType): ...
class Tensor_i64(TensorType): ...
class TensorType:
def __init__(self, data_flatten: List, shape: List[int])->None: ...
@classmethod
def randn(cls, shape: List[int], seed: Optional[int] = None)->"TensorType": ...
@classmethod
def zeros(cls, shape: List[int])->"TensorType": ...
@classmethod
def ones(cls, shape: List[int])->"TensorType": ...
@classmethod
def full(cls, shape: List[int], fill_value)->"TensorType": ...
@classmethod
def arange(cls, start, stop, step = None)->"TensorType": ...
def reprstr(self, spacing_size: int)->str: ...
def __repr__(self) -> str: ...
def __add__(self, other: "TensorType")->"TensorType": ...
def __iadd__(self, other: "TensorType")->"TensorType": ...
def __sub__(self, other: "TensorType")->"TensorType": ...
def __isub__(self, other: "TensorType")->"TensorType": ...
def __mul__(self, other: "TensorType")->"TensorType": ...
def __imul__(self, other: "TensorType")->"TensorType": ...
def __div__(self, other: "TensorType")->"TensorType": ...
def __idiv__(self, other: "TensorType")->"TensorType": ...
def __matmul__(self, other: "TensorType")->"TensorType": ...
def matmul(self, other: "TensorType")->"TensorType": ...
def dot(self, other: "TensorType")->"TensorType": ...
@property
def shape(self)->List[int]: ...
@property
def strides(self)->List[int]: ...
@property
def ndim(self)->int: ...
@property
def size(self)->int: ...
def get_by_slicing(self, slice: List[Tuple[Optional[int], Optional[int], Optional[int]]])->"TensorType": ...
def set_by_slicing(self, slice: List[Tuple[Optional[int], Optional[int], Optional[int]]], data_flatten: List[int], shape_for_assert: List[int]): ...
def item(self)->int: ...
def reshape_(self, shape: List[int]): ...
def reshape(self, shape: List[int])->"TensorType": ...
@property
def T(self)->"TensorType": ...
def transpose(self, axis_order: List[int])->"TensorType": ...
def tobytes(self)->List: ...
@classmethod
def frombytes(self, buffer: List)->"TensorType": ...
def pow_scalar(self, value:float) -> "TensorType": ...
def pow_scalar_(self, value:float): ...
def mean(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...
def sum(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...
def max(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...
def min(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...
def argmax(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...
def argmin(self, dim:Optional[int]=None, keepdims:bool=False)->"TensorType": ...