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
1d5dac76
Unverified
Commit
1d5dac76
authored
Mar 29, 2022
by
Julian Schoep
Committed by
GitHub
Mar 29, 2022
Browse files
fix: fix TypeError in ROI subsampling function (#893)
* fix TypeError in ROI subsampling function * add comment
parent
a35f4297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pcdet/models/roi_heads/target_assigner/proposal_target_layer.py
...models/roi_heads/target_assigner/proposal_target_layer.py
+1
-1
No files found.
pcdet/models/roi_heads/target_assigner/proposal_target_layer.py
View file @
1d5dac76
...
...
@@ -145,7 +145,7 @@ class ProposalTargetLayer(nn.Module):
rand_num
=
np
.
floor
(
np
.
random
.
rand
(
self
.
roi_sampler_cfg
.
ROI_PER_IMAGE
)
*
fg_num_rois
)
rand_num
=
torch
.
from_numpy
(
rand_num
).
type_as
(
max_overlaps
).
long
()
fg_inds
=
fg_inds
[
rand_num
]
bg_inds
=
[]
bg_inds
=
fg_inds
[
fg_inds
<
0
]
# yield empty tensor
elif
bg_num_rois
>
0
and
fg_num_rois
==
0
:
# sampling bg
...
...
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