2bff8339dd900a638be88441150166fd4c0fba19,tests/pytorch/test_nn.py,,test_set2set,#,64

Before Change


    print(s2s)

    // test/Ǘ: basic
    h0 = th.rand(g.number_of_nodes(), 5)
    h1 = s2s(h0, g)
    assert h1.shape[0] == 10 and h1.dim() == 1

    // test/ǘ: batched graph
    g1 = dgl.DGLGraph(nx.path_graph(11))
    g2 = dgl.DGLGraph(nx.path_graph(5))
    bg = dgl.batch([g, g1, g2])
    h0 = th.rand(bg.number_of_nodes(), 5)
    h1 = s2s(h0, bg)
    assert h1.shape[0] == 3 and h1.shape[1] == 10 and h1.dim() == 2

def test_glob_att_pool():

After Change


    print(s2s)

    // test/Ǘ: basic
    h0 = F.randn((g.number_of_nodes(), 5))
    h1 = s2s(h0, g)
    assert h1.shape[0] == 10 and h1.dim() == 1

    // test/ǘ: batched graph
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: dmlc/dgl
Commit Name: 2bff8339dd900a638be88441150166fd4c0fba19
Time: 2019-08-21
Author: classicxsong@gmail.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_set2set


Project Name: dmlc/dgl
Commit Name: 2bff8339dd900a638be88441150166fd4c0fba19
Time: 2019-08-21
Author: classicxsong@gmail.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_glob_att_pool


Project Name: dmlc/dgl
Commit Name: 2bff8339dd900a638be88441150166fd4c0fba19
Time: 2019-08-21
Author: classicxsong@gmail.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_set2set


Project Name: dmlc/dgl
Commit Name: 2bff8339dd900a638be88441150166fd4c0fba19
Time: 2019-08-21
Author: classicxsong@gmail.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_set_trans


Project Name: dmlc/dgl
Commit Name: 2bff8339dd900a638be88441150166fd4c0fba19
Time: 2019-08-21
Author: classicxsong@gmail.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_simple_pool