Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
bfc2d303
Unverified
Commit
bfc2d303
authored
Jan 09, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Jan 09, 2020
Browse files
[BUG] Fix MovieLens feature assignment (#1183)
Fixes #1182 . This is embarrassing.
parent
bb6a6476
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/recommendation/rec/datasets/movielens.py
examples/pytorch/recommendation/rec/datasets/movielens.py
+1
-1
No files found.
examples/pytorch/recommendation/rec/datasets/movielens.py
View file @
bfc2d303
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment