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

skip-gram center and context word? #16

Open
529261027 opened this issue Mar 7, 2021 · 2 comments
Open

skip-gram center and context word? #16

529261027 opened this issue Mar 7, 2021 · 2 comments

Comments

@529261027
Copy link

非常感谢您分享的代码。
在skip-gram,我有些问题请教下您,
I_z = {center: 1}这个地方是不是应该是计算context的节点吧,
V = np.array(node_list[contexts]['embedding_vectors']) 应该是计算center的节点embedding吧,
最终更新的是
for z in context_u:
tmp_z, tmp_loss = skip_gram(u, z, neg_u, node_list_u, lam, alpha)
node_list_u[z]['embedding_vectors'] += tmp_z ## 这里是不是更新center节点的embedding吧?

十分期待您的解答!

@jhljx
Copy link

jhljx commented Jun 7, 2021

我觉得是I_z = {contexts: 1},V = np.array(node_list[center]['embedding_vectors'])。这样才和论文的公式一致

@willow-yll
Copy link

是的!我觉得也是

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

3 participants