"python/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "9e9a9488f1fb421c92f89da518f30518b57e057e"
Unverified Commit bfc2d303 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[BUG] Fix MovieLens feature assignment (#1183)

Fixes #1182 .

This is embarrassing.
parent bb6a6476
...@@ -155,7 +155,7 @@ class MovieLens(object): ...@@ -155,7 +155,7 @@ class MovieLens(object):
# bag-of-words # bag-of-words
g.ndata['title'] = torch.zeros(g.number_of_nodes(), len(vocab)) g.ndata['title'] = torch.zeros(g.number_of_nodes(), len(vocab))
for i, tw in enumerate(tqdm.tqdm(title_words)): for i, tw in enumerate(tqdm.tqdm(title_words)):
g.ndata['title'][i, [vocab_invmap[w] for w in tw]] = 1 g.ndata['title'][len(user_ids) + i, [vocab_invmap[w] for w in tw]] = 1
self.vocab = vocab self.vocab = vocab
self.vocab_invmap = vocab_invmap self.vocab_invmap = vocab_invmap
......
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