Bug fix: fix setting different learning rates between backbone and main model in ACT policy (#280)

This commit is contained in:
Thomas Wolf
2024-06-18 14:31:35 +02:00
committed by GitHub
parent b72d574891
commit 11f1cb5dc9
2 changed files with 32 additions and 2 deletions

View File

@@ -53,12 +53,14 @@ def make_optimizer_and_scheduler(cfg, policy):
"params": [
p
for n, p in policy.named_parameters()
if not n.startswith("backbone") and p.requires_grad
if not n.startswith("model.backbone") and p.requires_grad
]
},
{
"params": [
p for n, p in policy.named_parameters() if n.startswith("backbone") and p.requires_grad
p
for n, p in policy.named_parameters()
if n.startswith("model.backbone") and p.requires_grad
],
"lr": cfg.training.lr_backbone,
},