Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typing][A-43] Add type annotations for paddle/optimizer/lamb.py #65247

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
gouzil committed Jun 18, 2024
commit 416888fab5acd0a379ffd529a4a03ee3b36aa800
8 changes: 6 additions & 2 deletions python/paddle/optimizer/lamb.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ def __init__(
epsilon: float = 1e-6,
parameters: Sequence[Tensor] | Sequence[_ParameterConfig] | None = None,
grad_clip: GradientClipBase | None = None,
exclude_from_weight_decay_fn: Callable | None = None,
exclude_from_weight_decay_fn: Callable[[Tensor], bool] | None = None,
multi_precision: bool = False,
always_adapt: bool = False,
name: str | None = None,
):
) -> None:
assert learning_rate is not None
assert beta1 is not None
assert beta2 is not None
assert epsilon is not None
super().__init__(
learning_rate=learning_rate,
parameters=parameters,
Expand Down