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-sparse
Commits
92b1e639
Commit
92b1e639
authored
Mar 18, 2020
by
rusty1s
Browse files
typo
parent
c74b62c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
torch_sparse/saint.py
torch_sparse/saint.py
+3
-3
No files found.
torch_sparse/saint.py
View file @
92b1e639
...
@@ -7,7 +7,7 @@ from torch_sparse.tensor import SparseTensor
...
@@ -7,7 +7,7 @@ from torch_sparse.tensor import SparseTensor
def
sample_node
(
src
:
SparseTensor
,
def
sample_node
(
src
:
SparseTensor
,
num_nodes
:
int
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
num_nodes
:
int
)
->
Tuple
[
Sparse
Tensor
,
torch
.
Tensor
]:
row
,
col
,
_
=
src
.
coo
()
row
,
col
,
_
=
src
.
coo
()
inv_in_deg
=
src
.
storage
.
colcount
().
to
(
torch
.
float
).
pow_
(
-
1
)
inv_in_deg
=
src
.
storage
.
colcount
().
to
(
torch
.
float
).
pow_
(
-
1
)
...
@@ -25,7 +25,7 @@ def sample_node(src: SparseTensor,
...
@@ -25,7 +25,7 @@ def sample_node(src: SparseTensor,
def
sample_edge
(
src
:
SparseTensor
,
def
sample_edge
(
src
:
SparseTensor
,
num_edges
:
int
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
num_edges
:
int
)
->
Tuple
[
Sparse
Tensor
,
torch
.
Tensor
]:
row
,
col
,
_
=
src
.
coo
()
row
,
col
,
_
=
src
.
coo
()
...
@@ -44,7 +44,7 @@ def sample_edge(src: SparseTensor,
...
@@ -44,7 +44,7 @@ def sample_edge(src: SparseTensor,
def
sample_rw
(
src
:
SparseTensor
,
num_root_nodes
:
int
,
def
sample_rw
(
src
:
SparseTensor
,
num_root_nodes
:
int
,
walk_length
:
int
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
walk_length
:
int
)
->
Tuple
[
Sparse
Tensor
,
torch
.
Tensor
]:
rowptr
,
col
,
_
=
src
.
csr
()
rowptr
,
col
,
_
=
src
.
csr
()
...
...
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