"vscode:/vscode.git/clone" did not exist on "eb9c067b083027be9986dcddf4a61aec6f52826c"
Unverified Commit ee9093f5 authored by Mufei Li's avatar Mufei Li Committed by GitHub
Browse files

Update message-efficient.rst (#2247)

parent 8ad7c3e8
...@@ -59,7 +59,7 @@ implementation would be like: ...@@ -59,7 +59,7 @@ implementation would be like:
linear = nn.Parameter(torch.FloatTensor(size=(1, node_feat_dim * 2))) linear = nn.Parameter(torch.FloatTensor(size=(1, node_feat_dim * 2)))
def concat_message_function(edges): def concat_message_function(edges):
{'cat_feat': torch.cat([edges.src.ndata['feat'], edges.dst.ndata['feat']])} return {'cat_feat': torch.cat([edges.src.ndata['feat'], edges.dst.ndata['feat']])}
g.apply_edges(concat_message_function) g.apply_edges(concat_message_function)
g.edata['out'] = g.edata['cat_feat'] * linear g.edata['out'] = g.edata['cat_feat'] * linear
......
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