Skip to content

Commit

Permalink
Fix init bug of final cls/reg layer in convfc head (open-mmlab#6279)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshilong authored Oct 20, 2021
1 parent a32d7d4 commit 622f0c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,16 @@ def __init__(self,
out_features=out_dim_reg)

if init_cfg is None:
# when init_cfg is None,
# It has been set to
# [[dict(type='Normal', std=0.01, override=dict(name='fc_cls'))],
# [dict(type='Normal', std=0.001, override=dict(name='fc_reg'))]
# after `super(ConvFCBBoxHead, self).__init__()`
# we only need to append additional configuration
# for `shared_fcs`, `cls_fcs` and `reg_fcs`
self.init_cfg += [
dict(
type='Xavier',
layer='Linear',
override=[
dict(name='shared_fcs'),
dict(name='cls_fcs'),
Expand Down

0 comments on commit 622f0c4

Please sign in to comment.