diff --git a/src/network.c b/src/network.c index 32e5e96e..fd7cddfb 100644 --- a/src/network.c +++ b/src/network.c @@ -119,7 +119,7 @@ float get_current_rate(network net) return net.learning_rate * (1./(1.+exp(net.gamma*(batch_num - net.step)))); case SGDR: rate = net.learning_rate_min + - 0.5*(net.learning_rate_max-net.learning_rate_min) + 0.5*(net.learning_rate-net.learning_rate_min) * (1. + cos( (float) (batch_num % net.batches_per_cycle)*3.14159265 / net.batches_per_cycle)); return rate; diff --git a/src/parser.c b/src/parser.c index 77cac714..557e07ba 100644 --- a/src/parser.c +++ b/src/parser.c @@ -639,7 +639,6 @@ void parse_net_options(list *options, network *net) net->batch = option_find_int(options, "batch",1); net->learning_rate = option_find_float(options, "learning_rate", .001); net->learning_rate_min = option_find_float_quiet(options, "learning_rate_min", .00001); - net->learning_rate_max = option_find_float_quiet(options, "learning_rate_max", .001); net->batches_per_cycle = option_find_int_quiet(options, "sgdr_cycle", 500); net->momentum = option_find_float(options, "momentum", .9); net->decay = option_find_float(options, "decay", .0001);