MCPcopy
hub / github.com/THUDM/CogDL / test_gine_layer

Function test_gine_layer

tests/test_layers.py:15–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def test_gine_layer():
16 layer = GINELayer()
17 x = torch.eye(4)
18 edge_index = (torch.tensor([0, 0, 0, 1, 1, 2]), torch.tensor([1, 2, 3, 2, 3, 3]))
19 graph = Graph(x=x, edge_index=edge_index, edge_attr=torch.randn(6, 4))
20 x = layer(graph, x)
21 assert tuple(x.shape) == (4, 4)
22
23
24if __name__ == "__main__":

Callers 1

test_layers.pyFile · 0.85

Calls 2

GINELayerClass · 0.90
GraphClass · 0.90

Tested by

no test coverage detected