aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2022-08-10 15:25:20 +0800
committerJordan Gong <jordan.gong@protonmail.com>2022-08-10 15:27:38 +0800
commita035bbdd0cc5e39954272d13d1e1595db738846a (patch)
tree4dd155b460232e26665a4a44e9f6e347f8e25ad7
parentf9b51f152e94896a122325fa2c48b0ce10c881c5 (diff)
Fix a typo and add scheduler choices
-rw-r--r--simclr/evaluate.py3
-rw-r--r--simclr/main.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/simclr/evaluate.py b/simclr/evaluate.py
index 3267ead..f4a8fda 100644
--- a/simclr/evaluate.py
+++ b/simclr/evaluate.py
@@ -84,8 +84,9 @@ def parse_args_and_config():
optim_group.add_argument('--weight-decay', default=0., type=float,
help='Weight decay (l2 regularization)')
- sched_group = parser.add_argument_group('Optimizer parameters')
+ sched_group = parser.add_argument_group('Scheduler parameters')
sched_group.add_argument('--sched', default=None, type=str,
+ choices=('const', None, 'linear', 'warmup-anneal'),
help="Name of scheduler")
sched_group.add_argument('--warmup-iters', default=5, type=int,
help='Epochs for warmup (`warmup-anneal` scheduler only)')
diff --git a/simclr/main.py b/simclr/main.py
index b91b42b..69e2ab2 100644
--- a/simclr/main.py
+++ b/simclr/main.py
@@ -93,8 +93,9 @@ def parse_args_and_config():
optim_group.add_argument('--weight-decay', default=1e-6, type=float,
help='Weight decay (l2 regularization)')
- sched_group = parser.add_argument_group('Optimizer parameters')
+ sched_group = parser.add_argument_group('Scheduler parameters')
sched_group.add_argument('--sched', default='warmup-anneal', type=str,
+ choices=('const', None, 'linear', 'warmup-anneal'),
help="Name of scheduler")
sched_group.add_argument('--warmup-iters', default=2344, type=int,
help='Epochs for warmup (`warmup-anneal` scheduler only)')