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
dgl
Commits
d70a362d
Unverified
Commit
d70a362d
authored
May 23, 2022
by
Feiyang(Vance) Chen
Committed by
GitHub
May 23, 2022
Browse files
Update shadow.py (#4034)
Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
14251504
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/dgl/dataloading/shadow.py
python/dgl/dataloading/shadow.py
+1
-1
No files found.
python/dgl/dataloading/shadow.py
View file @
d70a362d
...
...
@@ -43,7 +43,7 @@ class ShaDowKHopSampler(Sampler):
>>> dataloader = dgl.dataloading.DataLoader(
... g, torch.arange(g.num_nodes()), sampler,
... batch_size=5, shuffle=True, drop_last=False, num_workers=4)
>>> for input_nodes, output_nodes,
(
subgraph
,)
in dataloader:
>>> for input_nodes, output_nodes, subgraph in dataloader:
... print(subgraph)
... assert torch.equal(input_nodes, subgraph.ndata[dgl.NID])
... assert torch.equal(input_nodes[:output_nodes.shape[0]], output_nodes)
...
...
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