Skip to content

Commit

Permalink
fix a bug of mot_reid init
Browse files Browse the repository at this point in the history
  • Loading branch information
GT9505 committed Aug 9, 2021
1 parent 8936550 commit 4d89200
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mmtrack/models/reid/fc_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FcModule(BaseModule):
Defaults to dict(type='ReLU').
inplace (bool, optional): Whether inplace the activatation module.
init_cfg (dict or list[dict], optional): Initialization config dict.
Defaults to dict(type='Kaiming', layer='fc').
Defaults to dict(type='Kaiming', layer='Linear').
"""

def __init__(self,
Expand All @@ -24,7 +24,7 @@ def __init__(self,
norm_cfg=None,
act_cfg=dict(type='ReLU'),
inplace=True,
init_cfg=dict(type='Kaiming', layer='fc')):
init_cfg=dict(type='Kaiming', layer='Linear')):
super(FcModule, self).__init__(init_cfg)
assert norm_cfg is None or isinstance(norm_cfg, dict)
assert act_cfg is None or isinstance(act_cfg, dict)
Expand Down
10 changes: 3 additions & 7 deletions mmtrack/models/reid/linear_reid_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class LinearReIDHead(BaseHead):
re-identificaiton module.
topk (int, optional): Calculate topk accuracy. Default to False.
init_cfg (dict or list[dict], optional): Initialization config dict.
Defaults to dict(type='Normal',layer=['fc_out', 'classifier'],
mean=0, std=0.01, bias=0).
Defaults to dict(type='Normal',layer='Linear', mean=0, std=0.01,
bias=0).
"""

def __init__(self,
Expand All @@ -46,11 +46,7 @@ def __init__(self,
loss_pairwise=None,
topk=(1, ),
init_cfg=dict(
type='Normal',
layer=['fc_out', 'classifier'],
mean=0,
std=0.01,
bias=0)):
type='Normal', layer='Linear', mean=0, std=0.01, bias=0)):
super(LinearReIDHead, self).__init__(init_cfg)
assert isinstance(topk, (int, tuple))
if isinstance(topk, int):
Expand Down

0 comments on commit 4d89200

Please sign in to comment.