Skip to content

Commit

Permalink
sorted comments so that a comment is before the related line of code
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobronzi committed Nov 7, 2023
1 parent 0b18f0e commit e9cf628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amlrt_project/models/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ class WarmupDecayFactory(SchedulerFactory):

def __post_init__(self):
"""Finish initialization."""
self.gamma = max(min(self.gamma, 1.0), self.eps)
# Clip gamma to something that make sense, just in case.
self.warmup = max(self.warmup, 0)
self.gamma = max(min(self.gamma, 1.0), self.eps)
# Same for warmup.
self.warmup = max(self.warmup, 0)

def __call__(self, optimizer: Optimizer) -> Dict[str, Any]:
"""Create scheduler."""
Expand Down

0 comments on commit e9cf628

Please sign in to comment.