Unverified Commit 4dae26a1 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[Doc] Fix typo in dataloading.negative_sampler (#2177)

* fix dataloading docs

* fix another
parent 7d8522a2
......@@ -89,6 +89,8 @@ on how messages are aggregated and combined as well.
# Copy to output back to CPU.
y[output_nodes] = h.cpu()
x = y
return y
Note that for the purpose of computing evaluation metric on the
......
......@@ -48,7 +48,7 @@ class Uniform(_BaseNegativeSampler):
Examples
--------
>>> g = dgl.graph(([0, 1, 2], [1, 2, 3]))
>>> neg_sampler = dgl.sampling.negative_sampler.Uniform(2)
>>> neg_sampler = dgl.dataloading.negative_sampler.Uniform(2)
>>> neg_sampler(g, [0, 1])
(tensor([0, 0, 1, 1]), tensor([1, 0, 2, 3]))
"""
......
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