MCPcopy Index your code
hub / github.com/dmlc/dgl / construct_graph

Function construct_graph

tests/python/common/data/test_serialize.py:26–34  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

24
25
26def construct_graph(n):
27 g_list = []
28 for _ in range(n):
29 g = generate_rand_graph(30)
30 g.edata["e1"] = F.randn((g.num_edges(), 32))
31 g.edata["e2"] = F.ones((g.num_edges(), 32))
32 g.ndata["n1"] = F.randn((g.num_nodes(), 64))
33 g_list.append(g)
34 return g_list
35
36
37@unittest.skipIf(F._default_context_str == "gpu", reason="GPU not implemented")

Callers 1

Calls 4

generate_rand_graphFunction · 0.85
appendMethod · 0.80
num_edgesMethod · 0.45
num_nodesMethod · 0.45

Tested by

no test coverage detected