Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions MinkowskiEngine/MinkowskiSparseTensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@ def torch_sparse_Tensor(coords, feats, size=None):

# return the contracted tensor
if contract_coords:
coords = coords // tensor_stride
coords = torch.div(coords, tensor_stride, rounding_mode='trunc')
if max_coords is not None:
max_coords = max_coords // tensor_stride
min_coords = min_coords // tensor_stride
max_coords = torch.div(max_coords, tensor_stride, rounding_mode='trunc')
min_coords = torch.div(min_coords, tensor_stride, rounding_mode='trunc')

new_coords = torch.cat((batch_indices, coords), dim=1).long()

Expand Down Expand Up @@ -534,7 +534,7 @@ def dense(self, shape=None, min_coordinate=None, contract_stride=True):

# return the contracted tensor
if contract_stride:
coords = coords // tensor_stride
coords = torch.div(coords, tensor_stride, rounding_mode='trunc')

nchannels = self.F.size(1)
if shape is None:
Expand Down