ONE - On-device Neural Engine
Loading...
Searching...
No Matches
adam.py
Go to the documentation of this file.
1from .optimizer import Optimizer
2
3
5 """
6 Adam optimizer.
7 """
8 def __init__(self,
9 learning_rate: float = 0.001,
10 beta1: float = 0.9,
11 beta2: float = 0.999,
12 epsilon: float = 1e-7) -> None:
13 """
14 Initialize the Adam optimizer.
15
16 Args:
17 learning_rate (float): The learning rate for optimization.
18 beta1 (float): Exponential decay rate for the first moment estimates.
19 beta2 (float): Exponential decay rate for the second moment estimates.
20 epsilon (float): Small constant to prevent division by zero.
21 """
22 super().__init__(learning_rate)
23 self.beta1: float = beta1
24 self.beta2: float = beta2
25 self.epsilon: float = epsilon
None __init__(self, float learning_rate=0.001, float beta1=0.9, float beta2=0.999, float epsilon=1e-7)
Definition adam.py:12