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
4dae26a1
Unverified
Commit
4dae26a1
authored
Sep 11, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Sep 11, 2020
Browse files
[Doc] Fix typo in dataloading.negative_sampler (#2177)
* fix dataloading docs * fix another
parent
7d8522a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
docs/source/guide/minibatch-inference.rst
docs/source/guide/minibatch-inference.rst
+2
-0
python/dgl/dataloading/negative_sampler.py
python/dgl/dataloading/negative_sampler.py
+1
-1
No files found.
docs/source/guide/minibatch-inference.rst
View file @
4dae26a1
...
@@ -88,6 +88,8 @@ on how messages are aggregated and combined as well.
...
@@ -88,6 +88,8 @@ on how messages are aggregated and combined as well.
h = F.relu(layer(block, (h, h_dst)))
h = F.relu(layer(block, (h, h_dst)))
# Copy to output back to CPU.
# Copy to output back to CPU.
y[output_nodes] = h.cpu()
y[output_nodes] = h.cpu()
x = y
return y
return y
...
...
python/dgl/dataloading/negative_sampler.py
View file @
4dae26a1
...
@@ -48,7 +48,7 @@ class Uniform(_BaseNegativeSampler):
...
@@ -48,7 +48,7 @@ class Uniform(_BaseNegativeSampler):
Examples
Examples
--------
--------
>>> g = dgl.graph(([0, 1, 2], [1, 2, 3]))
>>> g = dgl.graph(([0, 1, 2], [1, 2, 3]))
>>> neg_sampler = dgl.
sampl
ing.negative_sampler.Uniform(2)
>>> neg_sampler = dgl.
dataload
ing.negative_sampler.Uniform(2)
>>> neg_sampler(g, [0, 1])
>>> neg_sampler(g, [0, 1])
(tensor([0, 0, 1, 1]), tensor([1, 0, 2, 3]))
(tensor([0, 0, 1, 1]), tensor([1, 0, 2, 3]))
"""
"""
...
...
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