diff --git a/tools/train.py b/tools/train.py index 16ee091a..8e86c310 100644 --- a/tools/train.py +++ b/tools/train.py @@ -79,7 +79,7 @@ def build_opt_lr(model, current_epoch=0): m.eval() if current_epoch >= cfg.BACKBONE.TRAIN_EPOCH: for layer in cfg.BACKBONE.TRAIN_LAYERS: - for param in getattr(model.backbone, layer).parameters(): + for param in getattr(model.backbone, layer)().parameters(): param.requires_grad = True for m in getattr(model.backbone, layer).modules(): if isinstance(m, nn.BatchNorm2d):