I am using the lastest version 2.1.0, and run into this problem when I am downsampling a sparse tensor. Then I conducted some unit test, the input of my testing tensor is:
device_test = torch.device("cuda:0")
from torchsparse import SparseTensor
xyz = torch.tensor([[i,i,i,0] for i in range(16)]).to(torch.int32)
feature = torch.tensor([[i+1,i+1,i+1] for i in range(16)]).to(torch.float32)
Is there an existing issue for this?
Current Behavior
I am using the lastest version 2.1.0, and run into this problem when I am downsampling a sparse tensor. Then I conducted some unit test, the input of my testing tensor is:
device_test = torch.device("cuda:0") from torchsparse import SparseTensor
xyz = torch.tensor([[i,i,i,0] for i in range(16)]).to(torch.int32) feature = torch.tensor([[i+1,i+1,i+1] for i in range(16)]).to(torch.float32)
test_sparse = SparseTensor(feature,xyz,stride=1).to(device_test) print(test_sparse.C) print(test_sparse.F)
Then I passed it into the following model:
import torchsparse.nn as spnn
class sp_model(torch.nn.Module): def init(self,inch, outch): super().init() self.conv0 = spnn.Conv3d(inch,3,kernel_size=3,stride=1) self.conv1 = spnn.Conv3d(3,outch,kernel_size=3,stride=2)
model = sp_model(3,3).to(device_test)
The output of the first conv layer is normal, however, the second conv layer with stride =2 outputs an sparse tensor without any points.
![Uploading image.png…]()
Expected Behavior
No response
Environment
Anything else?
No response