Unverified Commit f7ce48bc authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[NN] Fix error message of GatedGraphConv (#1964)


Co-authored-by: default avatarZihao Ye <expye@outlook.com>
parent d34cbf31
...@@ -80,6 +80,8 @@ class GatedGraphConv(nn.Module): ...@@ -80,6 +80,8 @@ class GatedGraphConv(nn.Module):
with graph.local_scope(): with graph.local_scope():
assert graph.is_homogeneous(), \ assert graph.is_homogeneous(), \
"not a homograph; convert it with to_homo and pass in the edge type as argument" "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])) zero_pad = feat.new_zeros((feat.shape[0], self._out_feats - feat.shape[1]))
feat = th.cat([feat, zero_pad], -1) feat = th.cat([feat, zero_pad], -1)
......
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