You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a 2D dense tensor with zeros in first and last columns. I convert it to sparse tensor as said in docs and then convert it back to dense tensor. The shape of the resulting dense tensor is different.
If I give the correct shape to the dense() method of sparse tensor, the resulting dense tensor's shape is now correct, but the values are shifted to the left.
I noticed the same behaviour for tensors of larger dimensions with zero values at the beginning or/and at the end of some axis.
==========System==========
Linux-5.3.0-28-generic-x86_64-with-glibc2.10
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
3.8.1 (default, Jan 8 2020, 22:29:32)
[GCC 7.3.0]
==========Pytorch==========
1.7.1
torch.cuda.is_available(): True
==========NVIDIA-SMI==========
/usr/bin/nvidia-smi
Driver Version 440.64
CUDA Version 10.2
VBIOS Version 90.02.2E.00.0C
Image Version G001.0000.02.04
==========NVCC==========
/usr/local/cuda/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
==========CC==========
/usr/bin/c++
c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
==========MinkowskiEngine==========
0.5.1
MinkowskiEngine compiled with CUDA Support: True
NVCC version MinkowskiEngine is compiled: 10020
CUDART version MinkowskiEngine is compiled: 10020
Additional context
The text was updated successfully, but these errors were encountered:
This is an intended behavior in the MinkowskiEngine, but since this is not obvious and this issue is recurring, I changed the behavior from the commit aba0db2.
To give you some background, the MinkowskiEngine sparse tensors use a generalized Sparse Tensor which allows a sparse tensor to have negative coordinates.
Such negative coordinates cannot be converted to a dense tensor without translating the origin to the minimum coordinate. Thus, in the previous versions, we subtract the min_coordinate from the sparse tensor coordinates automatically. but now this behavior will not be the default option. Rather, if there is a negative coordinate, it will raise a ValueError and you must manually provide min_coordinate to resolve this issue.
Describe the bug
I have a 2D dense tensor with zeros in first and last columns. I convert it to sparse tensor as said in docs and then convert it back to dense tensor. The shape of the resulting dense tensor is different.
If I give the correct shape to the
dense()
method of sparse tensor, the resulting dense tensor's shape is now correct, but the values are shifted to the left.I noticed the same behaviour for tensors of larger dimensions with zero values at the beginning or/and at the end of some axis.
To Reproduce
Returns:
One more attempt:
Returns:
Steps to reproduce the behavior.
Expected behavior
I expect to obtain the same dense tensor after conversion.
Desktop (please complete the following information):
MinkowskiEngine.print_diagnostics()
)Additional context
The text was updated successfully, but these errors were encountered: