diff --git a/MinkowskiEngine/MinkowskiSparseTensor.py b/MinkowskiEngine/MinkowskiSparseTensor.py index b80d5f49..fe1d4695 100644 --- a/MinkowskiEngine/MinkowskiSparseTensor.py +++ b/MinkowskiEngine/MinkowskiSparseTensor.py @@ -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() @@ -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: