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

Function test_base_layer

tests/test_layers.py:6–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def test_base_layer():
7 layer = BaseLayer()
8 x = torch.eye(4)
9 edge_index = (torch.tensor([0, 0, 0, 1, 1, 2]), torch.tensor([1, 2, 3, 2, 3, 3]))
10 graph = Graph(x=x, edge_index=edge_index)
11 x = layer(graph, x)
12 assert tuple(x.shape) == (4, 4)
13
14
15def test_gine_layer():

Callers 1

test_layers.pyFile · 0.85

Calls 2

BaseLayerClass · 0.90
GraphClass · 0.90

Tested by

no test coverage detected