"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "1a300d84da41bfffbb6a53c8b805f123d2060c0e"
Commit e8214d47 authored by rusty1s's avatar rusty1s
Browse files

better coalesce default argument

parent d4306c8e
...@@ -7,7 +7,7 @@ import torch ...@@ -7,7 +7,7 @@ import torch
@torch.jit.script @torch.jit.script
def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor, def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor,
walk_length: int, p: float = 1, q: float = 1, walk_length: int, p: float = 1, q: float = 1,
coalesced: bool = False, num_nodes: Optional[int] = None): coalesced: bool = True, num_nodes: Optional[int] = None):
"""Samples random walks of length :obj:`walk_length` from all node indices """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 in :obj:`start` in the graph given by :obj:`(row, col)` as described in the
`"node2vec: Scalable Feature Learning for Networks" `"node2vec: Scalable Feature Learning for Networks"
...@@ -26,7 +26,7 @@ def random_walk(row: torch.Tensor, col: torch.Tensor, start: torch.Tensor, ...@@ -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`) breadth-first strategy and depth-first strategy (default: :obj:`1`)
coalesced (bool, optional): If set to :obj:`True`, will coalesce/sort coalesced (bool, optional): If set to :obj:`True`, will coalesce/sort
the graph given by :obj:`(row, col)` according to :obj:`row`. the graph given by :obj:`(row, col)` according to :obj:`row`.
(default: :obj:`False`) (default: :obj:`True`)
num_nodes (int, optional): The number of nodes. (default: :obj:`None`) num_nodes (int, optional): The number of nodes. (default: :obj:`None`)
:rtype: :class:`LongTensor` :rtype: :class:`LongTensor`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment