72e8ef33d6a6239b71dbd1b24edccf1e5d03d9a1,test/nn/conv/test_gcn_conv.py,,test_gcn_conv,#,5
Before Change
def test_gcn_conv():
in_channels, out_channels = (16, 32)
edge_index = torch.tensor([[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]])
num_nodes = edge_index.max().item() + 1
edge_weight = torch.rand(edge_index.size(1))
x = torch.randn((num_nodes, in_channels))
conv = GCNConv(in_channels, out_channels)
assert conv.__repr__() == "GCNConv(16, 32)"
out = conv(x, edge_index)
assert out.size() == (num_nodes, out_channels)
assert conv(x, edge_index, edge_weight).size() == (num_nodes, out_channels)
jit_conv = conv.jittable()
jit_conv = torch.jit.script(jit_conv)
assert jit_conv(x, edge_index).tolist() == out.tolist()
conv = GCNConv(in_channels, out_channels, cached=True)
out = conv(x, edge_index)
out = conv(x, edge_index)
assert out.size() == (num_nodes, out_channels)
assert conv(x, edge_index, edge_weight).size() == (num_nodes, out_channels)
jit_conv = conv.jittable()
After Change
assert conv.__repr__() == "GCNConv(16, 32)"
out1 = conv(x, edge_index)
assert out1.size() == (4, 32)
assert torch.allclose(conv(x, adj1.t()), out1, atol=1e-6)
out2 = conv(x, edge_index, value)
assert out2.size() == (4, 32)
assert torch.allclose(conv(x, adj2.t()), out2, atol=1e-6)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 72e8ef33d6a6239b71dbd1b24edccf1e5d03d9a1
Time: 2020-06-15
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_gcn_conv.py
Class Name:
Method Name: test_gcn_conv
Project Name: rusty1s/pytorch_geometric
Commit Name: 14534a49d97c0f6cc815b9a7336dc0f8497131c1
Time: 2020-06-16
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_tag_conv.py
Class Name:
Method Name: test_tag_conv
Project Name: rusty1s/pytorch_geometric
Commit Name: 72e8ef33d6a6239b71dbd1b24edccf1e5d03d9a1
Time: 2020-06-15
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_gcn_conv.py
Class Name:
Method Name: test_gcn_conv
Project Name: rusty1s/pytorch_geometric
Commit Name: 18f7a20f9098da9bd848e31b501b6b1c571accc1
Time: 2020-06-27
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_appnp.py
Class Name:
Method Name: test_appnp