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

Function test_agnn_conv_bi

tests/python/mxnet/test_nn.py:331–342  ·  view source on GitHub ↗
(g, idtype)

Source from the content-addressed store, hash-verified

329@parametrize_idtype
330@pytest.mark.parametrize("g", get_cases(["bipartite"], exclude=["zero-degree"]))
331def test_agnn_conv_bi(g, idtype):
332 g = g.astype(idtype).to(F.ctx())
333 ctx = F.ctx()
334 agnn_conv = nn.AGNNConv(0.1, True)
335 agnn_conv.initialize(ctx=ctx)
336 print(agnn_conv)
337 feat = (
338 F.randn((g.number_of_src_nodes(), 5)),
339 F.randn((g.number_of_dst_nodes(), 5)),
340 )
341 h = agnn_conv(g, feat)
342 assert h.shape == (g.number_of_dst_nodes(), 5)
343
344
345def test_appnp_conv():

Callers

nothing calls this directly

Calls 5

number_of_src_nodesMethod · 0.80
number_of_dst_nodesMethod · 0.80
toMethod · 0.45
astypeMethod · 0.45
ctxMethod · 0.45

Tested by

no test coverage detected