Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 1e27b0c

Browse files
committed
bugfix: do not modify features in place
1 parent 3959a3a commit 1e27b0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

second/pytorch/models/pointpillars.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def forward(self, features, num_voxels, coors):
117117

118118
# Find distance of x, y, and z from pillar center
119119
f_center = torch.zeros_like(features[:, :, :2])
120-
f_center[:, :, 0] = f_center[:, :, 0] - (coors[:, 3].float().unsqueeze(1) * self.vx + self.x_offset)
121-
f_center[:, :, 1] = f_center[:, :, 1] - (coors[:, 2].float().unsqueeze(1) * self.vy + self.y_offset)
120+
f_center[:, :, 0] = features[:, :, 0] - (coors[:, 3].float().unsqueeze(1) * self.vx + self.x_offset)
121+
f_center[:, :, 1] = features[:, :, 1] - (coors[:, 2].float().unsqueeze(1) * self.vy + self.y_offset)
122122

123123
# Combine together feature decorations
124124
features_ls = [features, f_cluster, f_center]

0 commit comments

Comments
 (0)