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
a199b58a
Unverified
Commit
a199b58a
authored
Jan 12, 2020
by
Mufei Li
Committed by
GitHub
Jan 12, 2020
Browse files
Fix (#1195)
parent
cd9599ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tutorials/models/1_gnn/1_gcn.py
tutorials/models/1_gnn/1_gcn.py
+2
-2
tutorials/models/1_gnn/9_gat.py
tutorials/models/1_gnn/9_gat.py
+1
-1
No files found.
tutorials/models/1_gnn/1_gcn.py
View file @
a199b58a
...
...
@@ -108,8 +108,8 @@ def load_cora_data():
data
=
citegrh
.
load_cora
()
features
=
th
.
FloatTensor
(
data
.
features
)
labels
=
th
.
LongTensor
(
data
.
labels
)
train_mask
=
th
.
B
yte
Tensor
(
data
.
train_mask
)
test_mask
=
th
.
B
yte
Tensor
(
data
.
test_mask
)
train_mask
=
th
.
B
ool
Tensor
(
data
.
train_mask
)
test_mask
=
th
.
B
ool
Tensor
(
data
.
test_mask
)
g
=
data
.
graph
# add self loop
g
.
remove_edges_from
(
nx
.
selfloop_edges
(
g
))
...
...
tutorials/models/1_gnn/9_gat.py
View file @
a199b58a
...
...
@@ -276,7 +276,7 @@ def load_cora_data():
data
=
citegrh
.
load_cora
()
features
=
torch
.
FloatTensor
(
data
.
features
)
labels
=
torch
.
LongTensor
(
data
.
labels
)
mask
=
torch
.
B
yte
Tensor
(
data
.
train_mask
)
mask
=
torch
.
B
ool
Tensor
(
data
.
train_mask
)
g
=
data
.
graph
# add self loop
g
.
remove_edges_from
(
nx
.
selfloop_edges
(
g
))
...
...
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