-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds triageWaiting to be triaged by maintainersWaiting to be triaged by maintainersver: 2.5.x
Description
Bug description
In BackboneFinetuning, which extends BaseFinetuning, the freeze_before_training method calls self.freeze(pl_module.backbone). However, the freeze method requires an additional train_bn argument to properly handle batch normalization layers.
Affected File
File: pytorch-lightning/src/lightning/pytorch/callbacks/finetuning.py
Class: BackboneFinetuning
Method: freeze_before_training
@override
def freeze_before_training(self, pl_module: "pl.LightningModule") -> None:
self.freeze(pl_module.backbone) # Missing `train_bn`
What version are you seeing the problem on?
v2.5
How to reproduce the bug
Error messages and logs
# Error messages and logs here please
Environment
Current environment
#- PyTorch Lightning Version (e.g., 2.5.0):
#- PyTorch Version (e.g., 2.5):
#- Python version (e.g., 3.12):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
More info
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageWaiting to be triaged by maintainersWaiting to be triaged by maintainersver: 2.5.x