Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 NSLoss 的问题 #108

Open
JXT218 opened this issue Jun 23, 2021 · 1 comment
Open

关于 NSLoss 的问题 #108

JXT218 opened this issue Jun 23, 2021 · 1 comment

Comments

@JXT218
Copy link

JXT218 commented Jun 23, 2021

您好,

我注意到在dgl 的 implementation, negative sample 并不是uniform 的,而是

[ (log(i+2) - log(i+1)) / log(num_nodes + 1)]

当i 越来越大,sample 到的概率越小,可是node 的 index 是随机生成,为什么要让sample的概率和node的顺序有关呢?

见如下链接
https://github.com/dmlc/dgl/blob/31f4483af7eaced74540bfbea373155b16720183/examples/pytorch/GATNE-T/src/main.py#L187

@cenyk1230
Copy link
Member

Hi @JXT218 节点的index是会根据random walks里的出现次数来重编号的,编号越小出现次数越多。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants