(self)
| 11 | |
| 12 | class ConvolutionTestCase(unittest.TestCase): |
| 13 | def test(self): |
| 14 | IC, OC = 3, 5 |
| 15 | coordinates = torch.IntTensor([[0, 1, -1], [0, 2, 1]]) |
| 16 | in_features = torch.rand(len(coordinates), IC) |
| 17 | |
| 18 | manager = _C.CoordinateMapManager() |
| 19 | in_key, unique_inverse_map = manager.insert_and_map(coordinates, [1, 1], "") |
| 20 | kernel_size = [3, 3] |
| 21 | kernel_stride = [2, 2] |
| 22 | kernel_dilation = [1, 1] |
| 23 | out_key = _C.CoordinateMapKey(3) |
| 24 | |
| 25 | # size, in, out |
| 26 | kernel = torch.rand(9, IC, OC) |
| 27 | |
| 28 | out_features = _C.ConvolutionForwardCPU( |
| 29 | in_features, |
| 30 | kernel, |
| 31 | kernel_size, |
| 32 | kernel_stride, |
| 33 | kernel_dilation, |
| 34 | _C.RegionType.HYPER_CUBE, |
| 35 | torch.IntTensor(), |
| 36 | in_key, |
| 37 | out_key, |
| 38 | manager, |
| 39 | ) |
| 40 | |
| 41 | print(in_features, out_features) |
| 42 | |
| 43 | def test_backward(self): |
| 44 | IC, OC = 3, 5 |
nothing calls this directly
no test coverage detected