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
ae1806f6
Unverified
Commit
ae1806f6
authored
Feb 15, 2019
by
Zihao Ye
Committed by
GitHub
Feb 15, 2019
Browse files
[Bugfix] RGCN tutorial (#388)
* fix rgcn tutorial * small fix * upd
parent
59ec7a9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/pytorch/rgcn/model.py
examples/pytorch/rgcn/model.py
+1
-1
tutorials/models/1_gnn/4_rgcn.py
tutorials/models/1_gnn/4_rgcn.py
+2
-2
No files found.
examples/pytorch/rgcn/model.py
View file @
ae1806f6
...
@@ -41,7 +41,7 @@ class BaseRGCN(nn.Module):
...
@@ -41,7 +41,7 @@ class BaseRGCN(nn.Module):
def
build_input_layer
(
self
):
def
build_input_layer
(
self
):
return
None
return
None
def
build_hidden_layer
(
self
):
def
build_hidden_layer
(
self
,
idx
):
raise
NotImplementedError
raise
NotImplementedError
def
build_output_layer
(
self
):
def
build_output_layer
(
self
):
...
...
tutorials/models/1_gnn/4_rgcn.py
View file @
ae1806f6
...
@@ -232,8 +232,8 @@ class Model(nn.Module):
...
@@ -232,8 +232,8 @@ class Model(nn.Module):
i2h
=
self
.
build_input_layer
()
i2h
=
self
.
build_input_layer
()
self
.
layers
.
append
(
i2h
)
self
.
layers
.
append
(
i2h
)
# hidden to hidden
# hidden to hidden
for
idx
in
range
(
self
.
num_hidden_layers
):
for
_
in
range
(
self
.
num_hidden_layers
):
h2h
=
self
.
build_hidden_layer
(
idx
)
h2h
=
self
.
build_hidden_layer
()
self
.
layers
.
append
(
h2h
)
self
.
layers
.
append
(
h2h
)
# hidden to output
# hidden to output
h2o
=
self
.
build_output_layer
()
h2o
=
self
.
build_output_layer
()
...
...
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