(self)
| 80 | print(output) |
| 81 | |
| 82 | def test_empty(self): |
| 83 | in_channels = 2 |
| 84 | coords, feats, labels = data_loader(in_channels, batch_size=1) |
| 85 | feats = feats.double() |
| 86 | feats.requires_grad_() |
| 87 | input = SparseTensor(feats, coords) |
| 88 | use_feat = torch.BoolTensor(len(input)) |
| 89 | use_feat.zero_() |
| 90 | pruning = MinkowskiPruning() |
| 91 | output = pruning(input, use_feat) |
| 92 | print(input) |
| 93 | print(use_feat) |
| 94 | print(output) |
| 95 | |
| 96 | # Check backward |
| 97 | fn = MinkowskiPruningFunction() |
| 98 | self.assertTrue( |
| 99 | gradcheck( |
| 100 | fn, |
| 101 | ( |
| 102 | input.F, |
| 103 | use_feat, |
| 104 | input.coordinate_map_key, |
| 105 | output.coordinate_map_key, |
| 106 | input.coordinate_manager, |
| 107 | ), |
| 108 | ) |
| 109 | ) |
| 110 | |
| 111 | def test_pruning(self): |
| 112 | in_channels, D = 2, 2 |
nothing calls this directly
no test coverage detected