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

Method forward

tests/python/mxnet/test_nn.py:738–745  ·  view source on GitHub ↗
(self, graph, n_feat, e_feat)

Source from the content-addressed store, hash-verified

736 super().__init__(**kwargs)
737
738 def forward(self, graph, n_feat, e_feat):
739 graph = graph.local_var()
740 graph.ndata["h"] = n_feat
741 graph.update_all(fn.copy_u("h", "m"), fn.sum("m", "h"))
742 n_feat += graph.ndata["h"]
743 graph.apply_edges(fn.u_add_v("h", "h", "e"))
744 e_feat += graph.edata["e"]
745 return n_feat, e_feat
746
747 g = dgl.graph(([], [])).to(F.ctx())
748 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