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

关于word2vec我有一个问题就是,我看李沐的视频,他说每个词有两个向量表示,一个是作为中心词时候的向量表示,一个是作为背景词时候的向量表示。在训练的时候这一点要怎么表现出来呢? #53

Open
gggamemaster opened this issue Oct 24, 2019 · 1 comment

Comments

@gggamemaster
Copy link

bug描述
描述一下你遇到的bug, 例如报错位置、报错信息(重要, 可以直接截个图)等

版本信息
pytorch:
torchvision:
torchtext:
...

@catqaq
Copy link

catqaq commented Dec 24, 2019

构造中心词和背景词两个词嵌入层
`embed_size = 100

net = nn.Sequential(
nn.Embedding(num_embeddings=len(idx_to_token), embedding_dim=embed_size),
nn.Embedding(num_embeddings=len(idx_to_token), embedding_dim=embed_size)
)`

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