(g, idtype, out_dim)
| 449 | @pytest.mark.parametrize("g", get_cases(["bipartite"], exclude=["zero-degree"])) |
| 450 | @pytest.mark.parametrize("out_dim", [1, 2]) |
| 451 | def test_edge_conv_bi(g, idtype, out_dim): |
| 452 | g = g.astype(idtype).to(F.ctx()) |
| 453 | ctx = F.ctx() |
| 454 | edge_conv = nn.EdgeConv(5, out_dim) |
| 455 | edge_conv.initialize(ctx=ctx) |
| 456 | print(edge_conv) |
| 457 | # test #1: basic |
| 458 | h0 = F.randn((g.number_of_src_nodes(), 5)) |
| 459 | x0 = F.randn((g.number_of_dst_nodes(), 5)) |
| 460 | h1 = edge_conv(g, (h0, x0)) |
| 461 | assert h1.shape == (g.number_of_dst_nodes(), out_dim) |
| 462 | |
| 463 | |
| 464 | @parametrize_idtype |
nothing calls this directly
no test coverage detected