Skip to content
Snippets Groups Projects

fix: Correct learning rate update in optimizer, reconstruction and surrogate

Merged Lorenzo Asfour requested to merge lasfour/calo-opt:main into main

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 in optimizer.py
  • Surrogate.train_model method in surrogate.py
  • Reconstruction.train_model method in reconstruction.py

Changes Made

  • Iterated over self.optimizer.param_groups and set param_group['lr'] = lr to properly update the learning rate in each affected method.

Merge request reports

Merged by Jan KieselerJan Kieseler 9 months ago (Jul 25, 2024 7:51am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
Please register or sign in to reply
Loading