From 054e2b1954aafb15b0e983180dda309cfd5d831f Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 12 May 2016 20:36:11 +0000
Subject: [PATCH] not sure
---
src/parser.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/parser.c b/src/parser.c
index b900ad7..5a9d0a3 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -432,6 +432,7 @@
learning_rate_policy get_policy(char *s)
{
+ if (strcmp(s, "random")==0) return RANDOM;
if (strcmp(s, "poly")==0) return POLY;
if (strcmp(s, "constant")==0) return CONSTANT;
if (strcmp(s, "step")==0) return STEP;
@@ -497,7 +498,7 @@
} else if (net->policy == SIG){
net->gamma = option_find_float(options, "gamma", 1);
net->step = option_find_int(options, "step", 1);
- } else if (net->policy == POLY){
+ } else if (net->policy == POLY || net->policy == RANDOM){
net->power = option_find_float(options, "power", 1);
}
net->max_batches = option_find_int(options, "max_batches", 0);
--
Gitblit v1.10.0