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
6b3e52c9
Commit
6b3e52c9
authored
Jul 06, 2020
by
Shaoshuai Shi
Browse files
bugfixed: typo in anchor_head_multi
parent
3e92d169
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pcdet/models/dense_heads/anchor_head_multi.py
pcdet/models/dense_heads/anchor_head_multi.py
+3
-1
No files found.
pcdet/models/dense_heads/anchor_head_multi.py
View file @
6b3e52c9
...
...
@@ -4,6 +4,7 @@ from .anchor_head_template import AnchorHeadTemplate
from
..backbones_2d
import
BaseBEVBackbone
import
torch
class
SingleHead
(
BaseBEVBackbone
):
def
__init__
(
self
,
model_cfg
,
input_channels
,
num_class
,
num_anchors_per_location
,
code_size
,
encode_conv_cfg
=
None
):
super
().
__init__
(
encode_conv_cfg
,
input_channels
)
...
...
@@ -75,6 +76,7 @@ class SingleHead(BaseBEVBackbone):
return
ret_dict
class
AnchorHeadMulti
(
AnchorHeadTemplate
):
def
__init__
(
self
,
model_cfg
,
input_channels
,
num_class
,
class_names
,
grid_size
,
point_cloud_range
,
predict_boxes_when_training
=
True
):
super
().
__init__
(
...
...
@@ -157,7 +159,7 @@ class AnchorHeadMulti(AnchorHeadTemplate):
reg_weights
=
positives
.
float
()
if
self
.
num_class
==
1
:
# class agnostic
box_cls_labels
[
positive
]
=
1
box_cls_labels
[
positive
s
]
=
1
pos_normalizer
=
positives
.
sum
(
1
,
keepdim
=
True
).
float
()
reg_weights
/=
torch
.
clamp
(
pos_normalizer
,
min
=
1.0
)
cls_weights
/=
torch
.
clamp
(
pos_normalizer
,
min
=
1.0
)
...
...
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