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
f7ce48bc
Unverified
Commit
f7ce48bc
authored
Aug 08, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Aug 08, 2020
Browse files
[NN] Fix error message of GatedGraphConv (#1964)
Co-authored-by:
Zihao Ye
<
expye@outlook.com
>
parent
d34cbf31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/dgl/nn/pytorch/conv/gatedgraphconv.py
python/dgl/nn/pytorch/conv/gatedgraphconv.py
+2
-0
No files found.
python/dgl/nn/pytorch/conv/gatedgraphconv.py
View file @
f7ce48bc
...
...
@@ -80,6 +80,8 @@ class GatedGraphConv(nn.Module):
with
graph
.
local_scope
():
assert
graph
.
is_homogeneous
(),
\
"not a homograph; convert it with to_homo and pass in the edge type as argument"
assert
etypes
.
min
()
>=
0
and
etypes
.
max
()
<
self
.
_n_etypes
,
\
"edge type indices out of range [0, {})"
.
format
(
self
.
_n_etypes
)
zero_pad
=
feat
.
new_zeros
((
feat
.
shape
[
0
],
self
.
_out_feats
-
feat
.
shape
[
1
]))
feat
=
th
.
cat
([
feat
,
zero_pad
],
-
1
)
...
...
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