MCPcopy
hub / github.com/dmlc/dgl / test_MNIST_SuperPixel

Function test_MNIST_SuperPixel

tests/integration/test_data.py:134–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132 dgl.backend.backend_name != "pytorch", reason="only supports pytorch"
133)
134def test_MNIST_SuperPixel():
135 transform = dgl.AddSelfLoop(allow_duplicate=True)
136 dataset1 = data.MNISTSuperPixelDataset()
137 g1, _ = dataset1[0]
138 dataset2 = data.MNISTSuperPixelDataset(transform=transform)
139 g2, _ = dataset2[0]
140
141 assert g2.num_edges() - g1.num_edges() == g1.num_nodes()
142
143
144@unittest.skipIf(

Callers

nothing calls this directly

Calls 2

num_edgesMethod · 0.45
num_nodesMethod · 0.45

Tested by

no test coverage detected