MCPcopy
hub / github.com/dmlc/dgl / forward

Method forward

tests/python/pytorch/nn/test_nn.py:1304–1311  ·  view source on GitHub ↗
(self, graph, n_feat, e_feat)

Source from the content-addressed store, hash-verified

1302 super().__init__()
1303
1304 def forward(self, graph, n_feat, e_feat):
1305 graph = graph.local_var()
1306 graph.ndata["h"] = n_feat
1307 graph.update_all(fn.copy_u("h", "m"), fn.sum("m", "h"))
1308 n_feat += graph.ndata["h"]
1309 graph.apply_edges(fn.u_add_v("h", "h", "e"))
1310 e_feat += graph.edata["e"]
1311 return n_feat, e_feat
1312
1313 g = dgl.graph([])
1314 g.add_nodes(3)

Callers

nothing calls this directly

Calls 4

local_varMethod · 0.80
update_allMethod · 0.80
apply_edgesMethod · 0.45
num_nodesMethod · 0.45

Tested by

no test coverage detected