Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-scatter
Commits
f9f19eb3
Commit
f9f19eb3
authored
Jan 19, 2021
by
rusty1s
Browse files
fix doc building
parent
27f8fa35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
torch_scatter/__init__.py
torch_scatter/__init__.py
+3
-0
torch_scatter/segment_csr.py
torch_scatter/segment_csr.py
+9
-7
No files found.
torch_scatter/__init__.py
View file @
f9f19eb3
...
@@ -17,6 +17,9 @@ except AttributeError as e:
...
@@ -17,6 +17,9 @@ except AttributeError as e:
from
.placeholder
import
cuda_version_placeholder
from
.placeholder
import
cuda_version_placeholder
torch
.
ops
.
torch_scatter
.
cuda_version
=
cuda_version_placeholder
torch
.
ops
.
torch_scatter
.
cuda_version
=
cuda_version_placeholder
from
.placeholder
import
scatter_placeholder
torch
.
ops
.
torch_scatter
.
scatter_mul
=
scatter_placeholder
from
.placeholder
import
scatter_arg_placeholder
from
.placeholder
import
scatter_arg_placeholder
torch
.
ops
.
torch_scatter
.
scatter_min
=
scatter_arg_placeholder
torch
.
ops
.
torch_scatter
.
scatter_min
=
scatter_arg_placeholder
torch
.
ops
.
torch_scatter
.
scatter_max
=
scatter_arg_placeholder
torch
.
ops
.
torch_scatter
.
scatter_max
=
scatter_arg_placeholder
...
...
torch_scatter/segment_csr.py
View file @
f9f19eb3
...
@@ -22,16 +22,18 @@ def segment_mean_csr(src: torch.Tensor, indptr: torch.Tensor,
...
@@ -22,16 +22,18 @@ def segment_mean_csr(src: torch.Tensor, indptr: torch.Tensor,
@
torch
.
jit
.
script
@
torch
.
jit
.
script
def
segment_min_csr
(
src
:
torch
.
Tensor
,
indptr
:
torch
.
Tensor
,
def
segment_min_csr
(
out
:
Optional
[
torch
.
Tensor
]
=
None
src
:
torch
.
Tensor
,
indptr
:
torch
.
Tensor
,
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
out
:
Optional
[
torch
.
Tensor
]
=
None
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
return
torch
.
ops
.
torch_scatter
.
segment_min_csr
(
src
,
indptr
,
out
)
return
torch
.
ops
.
torch_scatter
.
segment_min_csr
(
src
,
indptr
,
out
)
@
torch
.
jit
.
script
@
torch
.
jit
.
script
def
segment_max_csr
(
src
:
torch
.
Tensor
,
indptr
:
torch
.
Tensor
,
def
segment_max_csr
(
out
:
Optional
[
torch
.
Tensor
]
=
None
src
:
torch
.
Tensor
,
indptr
:
torch
.
Tensor
,
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
out
:
Optional
[
torch
.
Tensor
]
=
None
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
return
torch
.
ops
.
torch_scatter
.
segment_max_csr
(
src
,
indptr
,
out
)
return
torch
.
ops
.
torch_scatter
.
segment_max_csr
(
src
,
indptr
,
out
)
...
@@ -51,7 +53,7 @@ def segment_csr(src: torch.Tensor, indptr: torch.Tensor,
...
@@ -51,7 +53,7 @@ def segment_csr(src: torch.Tensor, indptr: torch.Tensor,
Formally, if :attr:`src` and :attr:`indptr` are :math:`n`-dimensional and
Formally, if :attr:`src` and :attr:`indptr` are :math:`n`-dimensional and
:math:`m`-dimensional tensors with
:math:`m`-dimensional tensors with
size :math:`(x_0, ..., x_{m-1}, x_m, x_{m+1}, ..., x_{n-1})` and
size :math:`(x_0, ..., x_{m-1}, x_m, x_{m+1}, ..., x_{n-1})` and
:math:`(x_0, ..., x_{m-
1
}, y)`, respectively, then :attr:`out` must be an
:math:`(x_0, ..., x_{m-
2
}, y)`, respectively, then :attr:`out` must be an
:math:`n`-dimensional tensor with size
:math:`n`-dimensional tensor with size
:math:`(x_0, ..., x_{m-1}, y - 1, x_{m+1}, ..., x_{n-1})`.
:math:`(x_0, ..., x_{m-1}, y - 1, x_{m+1}, ..., x_{n-1})`.
Moreover, the values of :attr:`indptr` must be between :math:`0` and
Moreover, the values of :attr:`indptr` must be between :math:`0` and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment