Unverified Commit d1f6f3a8 authored by PotatoChipsNinja's avatar PotatoChipsNinja Committed by GitHub
Browse files

[Doc] fix a bug in guide_cn (#4149)


Co-authored-by: default avatarXin Yao <xiny@nvidia.com>
parent 020f0249
...@@ -22,7 +22,7 @@ DGL建议用户尽量减少边的特征维数。 ...@@ -22,7 +22,7 @@ DGL建议用户尽量减少边的特征维数。
linear = nn.Parameter(torch.FloatTensor(size=(node_feat_dim * 2, out_dim))) linear = nn.Parameter(torch.FloatTensor(size=(node_feat_dim * 2, out_dim)))
def concat_message_function(edges): def concat_message_function(edges):
return {'cat_feat': torch.cat([edges.src.ndata['feat'], edges.dst.ndata['feat']], dim=1)} return {'cat_feat': torch.cat([edges.src['feat'], edges.dst['feat']], dim=1)}
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