MinkowskiUnion

MinkowskiUnion

class MinkowskiEngine.MinkowskiUnion

Create a union of all sparse tensors and add overlapping features.

Args:

None

Warning

This function is experimental and the usage can be changed in the future updates.

__init__()

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(*inputs)
Args:

A variable number of MinkowskiEngine.SparseTensor’s.

Returns:

A MinkowskiEngine.SparseTensor with coordinates = union of all input coordinates, and features = sum of all features corresponding to the coordinate.

Example:

>>> # Define inputs
>>> input1 = SparseTensor(
>>>     torch.rand(N, in_channels, dtype=torch.double), coords=coords)
>>> # All inputs must share the same coordinate manager
>>> input2 = SparseTensor(
>>>     torch.rand(N, in_channels, dtype=torch.double),
>>>     coords=coords + 1,
>>>     coords_manager=input1.coordinate_manager,  # Must use same coords manager
>>>     force_creation=True  # The tensor stride [1, 1] already exists.
>>> )
>>> union = MinkowskiUnion()
>>> output = union(input1, iput2)