diff --git a/blueoil/blueoil_init.py b/blueoil/blueoil_init.py index f42028c93..514c22fb8 100644 --- a/blueoil/blueoil_init.py +++ b/blueoil/blueoil_init.py @@ -102,12 +102,12 @@ # ] -learning_rate_schedule_map = OrderedDict({ - "constant": "'constant' -> constant learning rate.", - "2-step-decay": "'2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1.", - "3-step-decay": "'3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1", - "3-step-decay-with-warmup": "'3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'", -}) +learning_rate_schedule_map = OrderedDict([ + ("constant", "'constant' -> constant learning rate."), + ("2-step-decay", "'2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1."), + ("3-step-decay", "'3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1"), + ("3-step-decay-with-warmup", "'3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'"), +]) def network_name_choices(task_type): @@ -304,7 +304,8 @@ def ask_questions(): learning_rate_schedule_question = { 'type': 'rawlist', 'name': 'value', - 'message': 'choose learning rate schedule:', + 'message': 'choose learning rate schedule \ +({epochs} is the number of training epochs you entered before):', 'choices': list(learning_rate_schedule_map.values()), 'default': learning_rate_schedule_map["constant"], } diff --git a/blueoil/templates/blueoil-config.tpl.yml b/blueoil/templates/blueoil-config.tpl.yml index cdef99cec..d45a12b01 100644 --- a/blueoil/templates/blueoil-config.tpl.yml +++ b/blueoil/templates/blueoil-config.tpl.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: {{ batch_size }} epochs: {{ training_epochs }} - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: {{ learning_rate_schedule }} initial_learning_rate: {{ initial_learning_rate_value }} diff --git a/tests/config/caltech101_classification.yml b/tests/config/caltech101_classification.yml index 0972528a9..df4424cb2 100644 --- a/tests/config/caltech101_classification.yml +++ b/tests/config/caltech101_classification.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/caltech101_classification_has_validation.yml b/tests/config/caltech101_classification_has_validation.yml index bb4df2c45..aa66dc765 100644 --- a/tests/config/caltech101_classification_has_validation.yml +++ b/tests/config/caltech101_classification_has_validation.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/delta_mark_classification.yml b/tests/config/delta_mark_classification.yml index 23e187bcb..d2ec9bc97 100644 --- a/tests/config/delta_mark_classification.yml +++ b/tests/config/delta_mark_classification.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/delta_mark_classification_has_validation.yml b/tests/config/delta_mark_classification_has_validation.yml index f15d4c770..f6a89355b 100644 --- a/tests/config/delta_mark_classification_has_validation.yml +++ b/tests/config/delta_mark_classification_has_validation.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/delta_mark_object_detection.yml b/tests/config/delta_mark_object_detection.yml index aaf7afae8..495d4110c 100644 --- a/tests/config/delta_mark_object_detection.yml +++ b/tests/config/delta_mark_object_detection.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/delta_mark_object_detection_has_validation.yml b/tests/config/delta_mark_object_detection_has_validation.yml index 8a25d165c..a345135d4 100644 --- a/tests/config/delta_mark_object_detection_has_validation.yml +++ b/tests/config/delta_mark_object_detection_has_validation.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/make_yml_config.py b/tests/config/make_yml_config.py index 6ff209f87..1ad065c2e 100644 --- a/tests/config/make_yml_config.py +++ b/tests/config/make_yml_config.py @@ -114,11 +114,12 @@ ] trainer_lr_schedule_comment = """\ - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' \ +({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. """ trainer_lr_schedules = [ diff --git a/tests/config/openimagesv4_object_detection.yml b/tests/config/openimagesv4_object_detection.yml index 9a5eff356..cfa1a9bdd 100644 --- a/tests/config/openimagesv4_object_detection.yml +++ b/tests/config/openimagesv4_object_detection.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001 diff --git a/tests/config/openimagesv4_object_detection_has_validation.yml b/tests/config/openimagesv4_object_detection_has_validation.yml index b247d1283..cea40b0ea 100644 --- a/tests/config/openimagesv4_object_detection_has_validation.yml +++ b/tests/config/openimagesv4_object_detection_has_validation.yml @@ -11,11 +11,11 @@ dataset: trainer: batch_size: 1 epochs: 1 - # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup'. + # supported 'learning_rate_schedule' is 'constant', '2-step-decay', '3-step-decay', '3-step-decay-with-warmup' ({epochs} is the number of training epochs you entered before). # 'constant' -> constant learning rate. - # '2-step-decay' -> learning rate reduce to 1/10 on epochs/2 and epochs-1. - # '3-step-decay' -> learning rate reduce to 1/10 on epochs/3 and epochs*2/3 and epochs-1 - # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay' + # '2-step-decay' -> learning rate decrease by 1/10 on {epochs}/2 and {epochs}-1. + # '3-step-decay' -> learning rate decrease by 1/10 on {epochs}/3 and {epochs}*2/3 and {epochs}-1. + # '3-step-decay-with-warmup' -> warmup learning rate 1/1000 in first epoch, then train same as '3-step-decay'. learning_rate_schedule: constant initial_learning_rate: 0.001