fix learning rate setting
@@ -161,15 +161,22 @@ def _blueoil_to_lmnet(blueoil_config):
step_per_epoch = float(_dataset_obj.num_per_epoch)/batch_size
learning_rate_kwargs = None
- if optimizer == "Momentum":
- optimizer_kwargs = {"momentum": 0.9, "learning_rate": initial_learning_rate}
- else:
- optimizer_kwargs = {"learning_rate": initial_learning_rate}
if learning_rate_schedule == "constant":
learning_rate_func = None
else:
learning_rate_func = "tf.train.piecewise_constant"
+ if learning_rate_schedule == "constant":
+ if optimizer == 'Momentum':
+ optimizer_kwargs = {"momentum": 0.9, "learning_rate": initial_learning_rate}
+ else:
+ optimizer_kwargs = {"learning_rate": initial_learning_rate}
+ else:
+ if optimizer == 'Momentum':
+ optimizer_kwargs = {"momentum": 0.9}
+ else:
+ optimizer_kwargs = {}
+
if learning_rate_schedule == "2-step-decay":
learning_rate_kwargs = {
"values": [
