Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenPCDet
Commits
46d558ed
Commit
46d558ed
authored
Dec 26, 2021
by
Shaoshuai Shi
Browse files
bugfixed: cumsum floordiv in vectorpool
parent
55d12ff5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_modules.py
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_modules.py
+1
-1
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_utils.py
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_utils.py
+1
-1
No files found.
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_modules.py
View file @
46d558ed
...
...
@@ -215,7 +215,7 @@ class VectorPoolLocalInterpolateModule(nn.Module):
self
.
max_neighbour_distance
,
self
.
nsample
,
self
.
neighbor_type
,
self
.
num_avg_length_of_neighbor_idxs
,
self
.
num_total_grids
,
self
.
neighbor_distance_multiplier
)
self
.
num_avg_length_of_neighbor_idxs
=
max
(
self
.
num_avg_length_of_neighbor_idxs
,
num_avg_length_of_neighbor_idxs
.
item
()
)
self
.
num_avg_length_of_neighbor_idxs
=
max
(
self
.
num_avg_length_of_neighbor_idxs
,
num_avg_length_of_neighbor_idxs
)
dist_recip
=
1.0
/
(
dist
+
1e-8
)
norm
=
torch
.
sum
(
dist_recip
,
dim
=-
1
,
keepdim
=
True
)
...
...
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_utils.py
View file @
46d558ed
...
...
@@ -337,7 +337,7 @@ class ThreeNNForVectorPoolByTwoStep(Function):
avg_length_of_neighbor_idxs
,
max_neighbour_distance
*
neighbor_distance_multiplier
,
nsample
,
neighbor_type
)
avg_length_of_neighbor_idxs
=
cumsum
[
0
]
//
num_new_xyz
+
int
(
cumsum
[
0
]
%
num_new_xyz
>
0
)
avg_length_of_neighbor_idxs
=
cumsum
[
0
]
.
item
()
//
num_new_xyz
+
int
(
cumsum
[
0
]
.
item
()
%
num_new_xyz
>
0
)
if
cumsum
[
0
]
<=
num_max_sum_points
:
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment