Unverified Commit 75fca8e4 authored by Chen Kai's avatar Chen Kai Committed by GitHub
Browse files

[bugfix] fix the bug of DotGatConv when compute the edge_softmax (#3272)


Co-authored-by: default avatarZihao Ye <expye@outlook.com>
parent f6349508
...@@ -208,7 +208,7 @@ class DotGatConv(nn.Module): ...@@ -208,7 +208,7 @@ class DotGatConv(nn.Module):
graph.apply_edges(fn.u_dot_v('ft', 'ft', 'a')) graph.apply_edges(fn.u_dot_v('ft', 'ft', 'a'))
# Step 2. edge softmax to compute attention scores # Step 2. edge softmax to compute attention scores
graph.edata['sa'] = edge_softmax(graph, graph.edata['a'])/(self._out_feats**0.5) graph.edata['sa'] = edge_softmax(graph, graph.edata['a'] / self._out_feats**0.5)
# Step 3. Broadcast softmax value to each edge, and aggregate dst node # Step 3. Broadcast softmax value to each edge, and aggregate dst node
graph.update_all(fn.u_mul_e('ft', 'sa', 'attn'), fn.sum('attn', 'agg_u')) graph.update_all(fn.u_mul_e('ft', 'sa', 'attn'), fn.sum('attn', 'agg_u'))
......
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