ONE - On-device Neural Engine
Loading...
Searching...
No Matches
optimizer.py
Go to the documentation of this file.
1from onert.native.libnnfw_api_pybind import trainable_ops
2
3
5 """
6 Base class for optimizers.
7 """
8 def __init__(self,
9 learning_rate: float = 0.001,
10 nums_trainable_ops: int = trainable_ops.ALL) -> None:
11 """
12 Initialize the optimizer.
13
14 Args:
15 learning_rate (float): The learning rate for optimization.
16 nums_trainable_ops (int or enum): Number of trainable ops or enum mask.
17 """
18 self.learning_rate: float = learning_rate
19 self.nums_trainable_ops: int = nums_trainable_ops
None __init__(self, float learning_rate=0.001, int nums_trainable_ops=trainable_ops.ALL)
Definition optimizer.py:10