"...text-generation-inference.git" did not exist on "d912f0bf55b8353ec2c694bebfd013ba5f5e16d6"
Unverified Commit 7e7376eb authored by xiang song(charlie.song)'s avatar xiang song(charlie.song) Committed by GitHub
Browse files

[Hotfix] Fix unsupervised graphsage (#2143)



* hotfix

* Hotfix
Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-87-240.ec2.internal>
parent e8273a85
...@@ -34,7 +34,7 @@ class NegativeSampler(object): ...@@ -34,7 +34,7 @@ class NegativeSampler(object):
dst = self.weights.multinomial(n, replacement=True) dst = self.weights.multinomial(n, replacement=True)
dst = dst.view(-1, 1, self.k).expand(-1, self.k, -1).flatten() dst = dst.view(-1, 1, self.k).expand(-1, self.k, -1).flatten()
else: else:
dst = self.weights.multinomial(n, replacement=True) dst = self.weights.multinomial(n*self.k, replacement=True)
src = src.repeat_interleave(self.k) src = src.repeat_interleave(self.k)
return src, dst return src, dst
......
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