r""" Args: :attr:`features` (:attr:`torch.FloatTensor`, :attr:`torch.DoubleTensor`, :attr:`torch.cuda.FloatTensor`, or :attr:`torch.cuda.DoubleTensor`): The features of a sparse tensor. :attr:`coordinates` (:attr:`torch.IntTensor`
(
self,
features: torch.Tensor,
coordinates: torch.Tensor = None,
# optional coordinate related arguments
tensor_stride: StrideType = 1,
coordinate_map_key: CoordinateMapKey = None,
coordinate_manager: CoordinateManager = None,
quantization_mode: SparseTensorQuantizationMode = SparseTensorQuantizationMode.RANDOM_SUBSAMPLE,
# optional manager related arguments
allocator_type: GPUMemoryAllocatorType = None,
minkowski_algorithm: MinkowskiAlgorithm = None,
requires_grad=None,
device=None,
)
| 120 | """ |
| 121 | |
| 122 | def __init__( |
| 123 | self, |
| 124 | features: torch.Tensor, |
| 125 | coordinates: torch.Tensor = None, |
| 126 | # optional coordinate related arguments |
| 127 | tensor_stride: StrideType = 1, |
| 128 | coordinate_map_key: CoordinateMapKey = None, |
| 129 | coordinate_manager: CoordinateManager = None, |
| 130 | quantization_mode: SparseTensorQuantizationMode = SparseTensorQuantizationMode.RANDOM_SUBSAMPLE, |
| 131 | # optional manager related arguments |
| 132 | allocator_type: GPUMemoryAllocatorType = None, |
| 133 | minkowski_algorithm: MinkowskiAlgorithm = None, |
| 134 | requires_grad=None, |
| 135 | device=None, |
| 136 | ): |
| 137 | r""" |
| 138 | |
| 139 | Args: |
| 140 | :attr:`features` (:attr:`torch.FloatTensor`, |
| 141 | :attr:`torch.DoubleTensor`, :attr:`torch.cuda.FloatTensor`, or |
| 142 | :attr:`torch.cuda.DoubleTensor`): The features of a sparse |
| 143 | tensor. |
| 144 | |
| 145 | :attr:`coordinates` (:attr:`torch.IntTensor`): The coordinates |
| 146 | associated to the features. If not provided, :attr:`coordinate_map_key` |
| 147 | must be provided. |
| 148 | |
| 149 | :attr:`tensor_stride` (:attr:`int`, :attr:`list`, |
| 150 | :attr:`numpy.array`, or :attr:`tensor.Tensor`): The tensor stride |
| 151 | of the current sparse tensor. By default, it is 1. |
| 152 | |
| 153 | :attr:`coordinate_map_key` |
| 154 | (:attr:`MinkowskiEngine.CoordinateMapKey`): When the coordinates |
| 155 | are already cached in the MinkowskiEngine, we could reuse the same |
| 156 | coordinate map by simply providing the coordinate map key. In most |
| 157 | case, this process is done automatically. When you provide a |
| 158 | `coordinate_map_key`, `coordinates` will be be ignored. |
| 159 | |
| 160 | :attr:`coordinate_manager` |
| 161 | (:attr:`MinkowskiEngine.CoordinateManager`): The MinkowskiEngine |
| 162 | manages all coordinate maps using the `_C.CoordinateMapManager`. If |
| 163 | not provided, the MinkowskiEngine will create a new computation |
| 164 | graph. In most cases, this process is handled automatically and you |
| 165 | do not need to use this. |
| 166 | |
| 167 | :attr:`quantization_mode` |
| 168 | (:attr:`MinkowskiEngine.SparseTensorQuantizationMode`): Defines how |
| 169 | continuous coordinates will be quantized to define a sparse tensor. |
| 170 | Please refer to :attr:`SparseTensorQuantizationMode` for details. |
| 171 | |
| 172 | :attr:`allocator_type` |
| 173 | (:attr:`MinkowskiEngine.GPUMemoryAllocatorType`): Defines the GPU |
| 174 | memory allocator type. By default, it uses the c10 allocator. |
| 175 | |
| 176 | :attr:`minkowski_algorithm` |
| 177 | (:attr:`MinkowskiEngine.MinkowskiAlgorithm`): Controls the mode the |
| 178 | minkowski engine runs, Use |
| 179 | :attr:`MinkowskiAlgorithm.MEMORY_EFFICIENT` if you want to reduce |
nothing calls this directly
no test coverage detected