-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from apax-hub/dev
v0.5.0
- Loading branch information
Showing
59 changed files
with
3,165 additions
and
1,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from typing import Literal | ||
|
||
from pydantic import BaseModel, NonNegativeFloat | ||
|
||
|
||
class LRSchedule(BaseModel, frozen=True, extra="forbid"): | ||
name: str | ||
|
||
|
||
class LinearLR(LRSchedule, frozen=True, extra="forbid"): | ||
""" | ||
Configuration of the optimizer. | ||
Learning rates of 0 will freeze the respective parameters. | ||
Parameters | ||
---------- | ||
name : str, default = "adam" | ||
transition_begin: int = 0 | ||
Number of steps after which to start decreasing | ||
end_value: NonNegativeFloat = 1e-6 | ||
Final LR at the end of training. | ||
""" | ||
|
||
name: Literal["linear"] | ||
transition_begin: int = 0 | ||
end_value: NonNegativeFloat = 1e-6 | ||
|
||
|
||
class CyclicCosineLR(LRSchedule, frozen=True, extra="forbid"): | ||
""" | ||
Configuration of the optimizer. | ||
Learning rates of 0 will freeze the respective parameters. | ||
Parameters | ||
---------- | ||
period: int = 20 | ||
Length of a cycle in epochs. | ||
decay_factor: NonNegativeFloat = 1.0 | ||
Factor by which to decrease the LR after each cycle. | ||
1.0 means no decrease. | ||
""" | ||
|
||
name: Literal["cyclic_cosine"] | ||
period: int = 20 | ||
decay_factor: NonNegativeFloat = 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.