Skip to content

Commit

Permalink
fix import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultdvx committed Sep 23, 2024
1 parent 264b003 commit 00752ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion clinicadl/optim/optimizer/factory.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Any, Dict, Tuple
from typing import Any, Dict, Iterable, Iterator, List, Tuple

import torch
import torch.nn as nn
import torch.optim as optim

Expand Down
5 changes: 1 addition & 4 deletions tests/unittests/optim/optimizer/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ def test_get_optimizer(network):
assert len(optimizer.param_groups) == 3

# special case : no ELSE mentioned
config = OptimizerConfig(
optimizer="Adagrad",
lr_decay={"conv1": 100},
)
config = create_optimizer_config("Adagrad")(lr_decay={"conv1": 100})
optimizer, _ = get_optimizer(network, config)
assert len(optimizer.param_groups) == 2
assert optimizer.param_groups[0]["lr_decay"] == 100
Expand Down

0 comments on commit 00752ff

Please sign in to comment.