MinkowskiPruning¶
MinkowskiPruning¶
-
class
MinkowskiEngine.MinkowskiPruning¶ Remove specified coordinates from a
MinkowskiEngine.SparseTensor.-
__init__()¶ Initializes internal Module state, shared by both nn.Module and ScriptModule.
-
forward(input: MinkowskiSparseTensor.SparseTensor, mask: torch.Tensor)¶ - Args:
input(MinkowskiEnigne.SparseTensor): a sparse tensor to remove coordinates from.mask(torch.BoolTensor): mask vector that specifies which one to keep. Coordinates with False will be removed.- Returns:
A
MinkowskiEngine.SparseTensorwith C = coordinates corresponding to mask == True F = copy of the features from mask == True.
Example:
>>> # Define inputs >>> input = SparseTensor(feats, coords=coords) >>> # Any boolean tensor can be used as the filter >>> mask = torch.rand(feats.size(0)) < 0.5 >>> pruning = MinkowskiPruning() >>> output = pruning(input, mask)
-
training: bool¶
-