fix: Correct learning rate update in optimizer, reconstruction and surrogate
Fix Learning Rate Update
Description
This merge request fixes the issue where the learning rate was incorrectly updated in multiple methods by directly assigning to self.optimizer.lr
, which did not affect the actual learning rate used by the optimizer. The correct approach is to update the learning rate in the optimizer's parameter groups.
Affected Methods
-
Optimizer.optimize
method inoptimizer.py
-
Surrogate.train_model
method insurrogate.py
-
Reconstruction.train_model
method inreconstruction.py
Changes Made
- Iterated over
self.optimizer.param_groups
and setparam_group['lr'] = lr
to properly update the learning rate in each affected method.