Skip to content

Commit

Permalink
bugfix(sup): fix wrong lr times
Browse files Browse the repository at this point in the history
  • Loading branch information
Haochen-Wang409 committed May 6, 2022
1 parent 08a6d48 commit 07415ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train_sup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def main():
# Optimizer and lr decay scheduler
cfg_trainer = cfg["trainer"]
cfg_optim = cfg_trainer["optimizer"]
times = 10 if "pascal" in cfg["dataset"]["type"] else 1

params_list = []
for module in modules_back:
Expand All @@ -105,7 +106,7 @@ def main():
)
for module in modules_head:
params_list.append(
dict(params=module.parameters(), lr=cfg_optim["kwargs"]["lr"] * 10)
dict(params=module.parameters(), lr=cfg_optim["kwargs"]["lr"] * times)
)

optimizer = get_optimizer(params_list, cfg_optim)
Expand Down

0 comments on commit 07415ac

Please sign in to comment.