(self)
| 224 | print(i) |
| 225 | |
| 226 | def test_analytic(self): |
| 227 | print(f"{self.__class__.__name__}: test") |
| 228 | in_channels, out_channels, D = 2, 2, 1 |
| 229 | coords = torch.IntTensor([[0, 0], [0, 1], [0, 2]]) |
| 230 | feats = torch.FloatTensor([[0, 1], [1, 0], [1, 1]]) |
| 231 | input = SparseTensor(feats, coordinates=coords) |
| 232 | # Initialize context |
| 233 | conv = MinkowskiConvolution( |
| 234 | in_channels, out_channels, kernel_size=2, stride=2, bias=False, dimension=D |
| 235 | ) |
| 236 | conv.kernel[:] = torch.FloatTensor([[[1, 2], [2, 1]], [[0, 1], [1, 0]]]) |
| 237 | output = conv(input) |
| 238 | print(output) |
| 239 | |
| 240 | conv = MinkowskiConvolution( |
| 241 | in_channels, out_channels, kernel_size=2, stride=1, bias=False, dimension=D |
| 242 | ) |
| 243 | conv.kernel[:] = torch.FloatTensor([[[1, 2], [2, 1]], [[0, 1], [1, 0]]]) |
| 244 | output = conv(input) |
| 245 | print(output) |
| 246 | |
| 247 | |
| 248 | class TestConvolutionMode(unittest.TestCase): |
nothing calls this directly
no test coverage detected