MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / test

Method test

tests/python/quantization.py:33–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31
32class TestQuantization(unittest.TestCase):
33 def test(self):
34 N = 16575
35 ignore_label = 255
36
37 coords = np.random.rand(N, 3) * 100
38 feats = np.random.rand(N, 4)
39 labels = np.floor(np.random.rand(N) * 3)
40
41 labels = labels.astype(np.int32)
42
43 # Make duplicates
44 coords[:3] = 0
45 labels[:3] = 2
46 quantized_coords, quantized_feats, quantized_labels = sparse_quantize(
47 coords.astype(np.int32), feats, labels, ignore_label
48 )
49
50 print(quantized_labels)
51
52 def test_device(self):
53 N = 16575

Callers

nothing calls this directly

Calls 1

sparse_quantizeFunction · 0.90

Tested by

no test coverage detected