Skip to content
Snippets Groups Projects
Commit 228a38ec authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

[segmentation/engine/adabound] Fix typing

parent 610850a2
No related branches found
No related tags found
1 merge request!46Create common library
......@@ -51,13 +51,13 @@ class AdaBound(torch.optim.Optimizer):
def __init__(
self,
params: list,
lr: float | None = 1e-3,
betas: tuple[float, float] | None = (0.9, 0.999),
final_lr: float | None = 0.1,
gamma: float | None = 1e-3,
eps: float | None = 1e-8,
weight_decay: float | None = 0,
amsbound: bool | None = False,
lr: float = 1e-3,
betas: tuple[float, float] = (0.9, 0.999),
final_lr: float = 0.1,
gamma: float = 1e-3,
eps: float = 1e-8,
weight_decay: float = 0,
amsbound: bool = False,
):
if not 0.0 <= lr:
raise ValueError(f"Invalid learning rate: {lr}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment