Unverified Commit 11437dbc authored by august's avatar august Committed by GitHub
Browse files

[Fix] Fix the wrong index of coor in middle_encoder.pillar_scatter.forward_single (#1280)



* fix the wrong index of coor in middle_encoder.pillar_scatter.forward_single

* make it consistent with forward_batch
Co-authored-by: default avatarTai-Wang <tab_wang@outlook.com>
parent a2b849a9
......@@ -50,14 +50,14 @@ class PointPillarsScatter(nn.Module):
dtype=voxel_features.dtype,
device=voxel_features.device)
indices = coors[:, 1] * self.nx + coors[:, 2]
indices = coors[:, 2] * self.nx + coors[:, 3]
indices = indices.long()
voxels = voxel_features.t()
# Now scatter the blob back to the canvas.
canvas[:, indices] = voxels
# Undo the column stacking to final 4-dim tensor
canvas = canvas.view(1, self.in_channels, self.ny, self.nx)
return [canvas]
return canvas
def forward_batch(self, voxel_features, coors, batch_size):
"""Scatter features of single sample.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment