Skip to content

Commit

Permalink
[Doc] Fix the example code of negative sampler (dmlc#3501)
Browse files Browse the repository at this point in the history
Co-authored-by: Jinjing Zhou <[email protected]>
  • Loading branch information
yaox12 and VoVAllen authored Nov 16, 2021
1 parent b8ce0f4 commit 65fdfad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/dgl/dataloading/negative_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Uniform(_BaseNegativeSampler):
--------
>>> g = dgl.graph(([0, 1, 2], [1, 2, 3]))
>>> neg_sampler = dgl.dataloading.negative_sampler.Uniform(2)
>>> neg_sampler(g, [0, 1])
>>> neg_sampler(g, torch.tensor([0, 1]))
(tensor([0, 0, 1, 1]), tensor([1, 0, 2, 3]))
"""
def __init__(self, k):
Expand Down

0 comments on commit 65fdfad

Please sign in to comment.