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-cluster
Commits
e8214d47
Commit
e8214d47
authored
Apr 02, 2020
by
rusty1s
Browse files
better coalesce default argument
parent
d4306c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torch_cluster/rw.py
torch_cluster/rw.py
+2
-2
No files found.
torch_cluster/rw.py
View file @
e8214d47
...
...
@@ -7,7 +7,7 @@ import torch
@
torch
.
jit
.
script
def
random_walk
(
row
:
torch
.
Tensor
,
col
:
torch
.
Tensor
,
start
:
torch
.
Tensor
,
walk_length
:
int
,
p
:
float
=
1
,
q
:
float
=
1
,
coalesced
:
bool
=
Fals
e
,
num_nodes
:
Optional
[
int
]
=
None
):
coalesced
:
bool
=
Tru
e
,
num_nodes
:
Optional
[
int
]
=
None
):
"""Samples random walks of length :obj:`walk_length` from all node indices
in :obj:`start` in the graph given by :obj:`(row, col)` as described in the
`"node2vec: Scalable Feature Learning for Networks"
...
...
@@ -26,7 +26,7 @@ def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor,
breadth-first strategy and depth-first strategy (default: :obj:`1`)
coalesced (bool, optional): If set to :obj:`True`, will coalesce/sort
the graph given by :obj:`(row, col)` according to :obj:`row`.
(default: :obj:`
Fals
e`)
(default: :obj:`
Tru
e`)
num_nodes (int, optional): The number of nodes. (default: :obj:`None`)
:rtype: :class:`LongTensor`
...
...
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