torchsparse
torchsparse copied to clipboard
Utility functions for transforming DenseTensors into SparseTensors and vice-versa
Hello,
Are there functions to transform data (or/and data batches) from dense format into sparse format, and from sparse format into dense format?
Minkowski Engine has similar functionality: https://nvidia.github.io/MinkowskiEngine/utils.html
Regards
We don't have utility functions for these. You might use torch.coo_tensor for sparse-to-dense conversion. As for dense-to-sparse conversion, you can first create a meshgrid for the dense vector and then construct SparseTensor.
TorchSparse v2.1.0 now has support for .dense(). Feel free to check it out!