Skip to content

Commit

Permalink
Fix the dimension index
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-liu authored Jul 31, 2024
1 parent 1def50d commit 2f38072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchsparse/nn/modules/bev.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def forward(self, input: SparseTensor) -> torch.Tensor:
assert isinstance(stride, torch.Tensor), type(stride)

# [b, x, y, z]
coords = (coords - self.offset).t()[[3] + self.bev_dims + [self.dim]].long()
coords = (coords - self.offset).t()[[0] + self.bev_dims + [self.dim]].long()
shape = self.shape[self.bev_dims + [self.dim]]

# now stride must be torch.Tensor since input.s is tuple.
Expand Down

0 comments on commit 2f38072

Please sign in to comment.