"examples/vscode:/vscode.git/clone" did not exist on "3b1978a3790115490accadb26ce418989b368764"
Unverified Commit 996c5331 authored by peizhou001's avatar peizhou001 Committed by GitHub
Browse files

[Model] Fix bug of gatv2 when input is block (#5000)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-16-19.ap-northeast-1.compute.internal>
parent 236fac4f
...@@ -294,11 +294,11 @@ class GATv2Conv(nn.Module): ...@@ -294,11 +294,11 @@ class GATv2Conv(nn.Module):
if self.share_weights: if self.share_weights:
feat_dst = feat_src feat_dst = feat_src
else: else:
feat_dst = self.fc_dst(h_src).view( feat_dst = self.fc_dst(h_dst).view(
-1, self._num_heads, self._out_feats -1, self._num_heads, self._out_feats
) )
if graph.is_block: if graph.is_block:
feat_dst = feat_src[: graph.number_of_dst_nodes()] feat_dst = feat_dst[: graph.number_of_dst_nodes()]
h_dst = h_dst[: graph.number_of_dst_nodes()] h_dst = h_dst[: graph.number_of_dst_nodes()]
graph.srcdata.update( graph.srcdata.update(
{"el": feat_src} {"el": feat_src}
......
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