DepthTensor 1.11.0__tar.gz → 1.12.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {depthtensor-1.11.0/src/DepthTensor.egg-info → depthtensor-1.12.0}/PKG-INFO +1 -1
- {depthtensor-1.11.0 → depthtensor-1.12.0}/pyproject.toml +1 -1
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/__init__.py +1 -1
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/elementwise.py +2 -2
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/typing.py +9 -6
- {depthtensor-1.11.0 → depthtensor-1.12.0/src/DepthTensor.egg-info}/PKG-INFO +1 -1
- {depthtensor-1.11.0 → depthtensor-1.12.0}/LICENSE +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/README.md +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/setup.cfg +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/__init__.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/exceptions.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/__init__.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/comparison.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/creation.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/diff.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/ops/reduction.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/random/__init__.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/random/generator.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/_core/utils.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/autodiff.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor/tensor.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor.egg-info/SOURCES.txt +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor.egg-info/dependency_links.txt +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor.egg-info/requires.txt +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/DepthTensor.egg-info/top_level.txt +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/example/example.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/src/example/test.py +0 -0
- {depthtensor-1.11.0 → depthtensor-1.12.0}/tests/test_tensor.py +0 -0
|
@@ -108,7 +108,7 @@ def create_2in_1out(
|
|
|
108
108
|
return y
|
|
109
109
|
else:
|
|
110
110
|
if y.requires_grad:
|
|
111
|
-
dx1, dx2 = diff(y, a1, a2)
|
|
111
|
+
dx1, dx2 = diff(y, a1, a2, **kwds)
|
|
112
112
|
def backward() -> None:
|
|
113
113
|
if isinstance(x1, Tensor) and x1.requires_grad:
|
|
114
114
|
x1.grad += y.grad * dx1()
|
|
@@ -160,7 +160,7 @@ def create_1in_1out(
|
|
|
160
160
|
return y
|
|
161
161
|
else:
|
|
162
162
|
if y.requires_grad:
|
|
163
|
-
dx = diff(y, a)
|
|
163
|
+
dx = diff(y, a, **kwds)
|
|
164
164
|
def backward() -> None:
|
|
165
165
|
if isinstance(x, Tensor) and x.requires_grad:
|
|
166
166
|
x.grad += y.grad * dx()
|
|
@@ -7,7 +7,8 @@ from typing import (
|
|
|
7
7
|
TYPE_CHECKING,
|
|
8
8
|
Protocol,
|
|
9
9
|
Any,
|
|
10
|
-
Callable
|
|
10
|
+
Callable,
|
|
11
|
+
Optional
|
|
11
12
|
)
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
@@ -46,7 +47,7 @@ class Func_2in_1out_Protocol(Protocol):
|
|
|
46
47
|
x1: OperandLike,
|
|
47
48
|
x2: OperandLike,
|
|
48
49
|
*,
|
|
49
|
-
device: DeviceLike =
|
|
50
|
+
device: Optional[DeviceLike] = None,
|
|
50
51
|
requires_grad: bool = True,
|
|
51
52
|
**kwds: Any
|
|
52
53
|
) -> TensorLike: ...
|
|
@@ -57,7 +58,7 @@ class Op_2in_1out_Protocol(Protocol):
|
|
|
57
58
|
x1: NDArrayLike,
|
|
58
59
|
x2: NDArrayLike,
|
|
59
60
|
*,
|
|
60
|
-
device: DeviceLike
|
|
61
|
+
device: DeviceLike,
|
|
61
62
|
**kwds: Any
|
|
62
63
|
) -> OperandLike: ...
|
|
63
64
|
|
|
@@ -66,7 +67,8 @@ class Diff_2in_1out_Protocol(Protocol):
|
|
|
66
67
|
self,
|
|
67
68
|
result: TensorLike,
|
|
68
69
|
x1: NDArrayLike,
|
|
69
|
-
x2: NDArrayLike
|
|
70
|
+
x2: NDArrayLike,
|
|
71
|
+
**kwds: Any
|
|
70
72
|
) -> Tuple[Callable[[], NDArrayLike], Callable[[], NDArrayLike]]: ...
|
|
71
73
|
|
|
72
74
|
class Func_1in_1out_Protocol(Protocol):
|
|
@@ -74,7 +76,7 @@ class Func_1in_1out_Protocol(Protocol):
|
|
|
74
76
|
self,
|
|
75
77
|
x: OperandLike,
|
|
76
78
|
*,
|
|
77
|
-
device: DeviceLike =
|
|
79
|
+
device: Optional[DeviceLike] = None,
|
|
78
80
|
requires_grad: bool = True,
|
|
79
81
|
**kwds: Any
|
|
80
82
|
) -> TensorLike: ...
|
|
@@ -84,7 +86,7 @@ class Op_1in_1out_Protocol(Protocol):
|
|
|
84
86
|
self,
|
|
85
87
|
x: NDArrayLike,
|
|
86
88
|
*,
|
|
87
|
-
device: DeviceLike
|
|
89
|
+
device: DeviceLike,
|
|
88
90
|
**kwds: Any
|
|
89
91
|
) -> OperandLike: ...
|
|
90
92
|
|
|
@@ -93,6 +95,7 @@ class Diff_1in_1out_Protocol(Protocol):
|
|
|
93
95
|
self,
|
|
94
96
|
result: TensorLike,
|
|
95
97
|
x: NDArrayLike,
|
|
98
|
+
**kwds: Any
|
|
96
99
|
) -> Callable[[], NDArrayLike]: ...
|
|
97
100
|
|
|
98
101
|
__all__ = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|