[BUG] SparseTensor.__add__
sometimes won't work even both spatial_range
stay the same.
#325
Open
1 task done
Is there an existing issue for this?
Current Behavior
SparseResBlock
cannot work when kernel size > 1 and stride > 1.Here's my code of that part:
The error message is as follows:
So it seems to be the issue with
SparseTensor.__add__
. When I set kernel to 1 OR stride to 1, there's no issue.I thought the issue is from the mismatch of
SparseTensor.spatial_range
, as there's no padding setting thus kernel > 1 AND stride > 1 would make theself.main(x)
andself.shortcut(x)
have differentsparial_range
.Thus I implemented my own version as below:
And I add some print for debugging. Here's what I got:
But the same error message persists, even though the
spatial_range
of both SparseTensors is the same. But I found in some way, it works:Basically I only update the
downsample
:(1, 1, 1)
to(1, 3, 3)
.spatial_range
stays the same when strided.Then it works, the partial output:
Where both
spatial_range
still stays the same.So my main concern is:
Why doesn't the
SparseTensor.__add__
function as expected under certain conditions, even when bothspatial_range
are aligned.Expected Behavior
SparseTensor.__add__
should work when bothspatial_range
are the same.Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: