mit-han-lab / torchsparse

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.

Home Page:https://torchsparse.mit.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The correct format of SparseTensor datatype?

Tortoise0Knight opened this issue · comments

In https://torchsparse-docs.github.io/reference/torchsparse.html#torchsparse.tensor.SparseTensor, it says:
coords – 2D integer tensor with of shape N x 4, where the first three dimensions correspond to quantized x, y, z coordinates, and the last dimension denotes the batch index.
However, when I checked the definition of sparse_collate() at line 27, torchsparse/utils/collate.py, it seems that the batch index should be the fist dimension of the batched SparseTensor. Also I checked the .F property of a SparseTensor in a torch.utils.data.DataLoader, it seems corresponding to the source code.
Is the description in the documentation wrong?

Yes. Thanks for pointing that out. We shifted the batch index to the first dimension in v2.1.0. Please refer to https://torchsparse-docs.github.io/getting_started/basics.html for more details.