From 81c23650e1b880279d29e9a6cef18d29e2cec69c Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 16 Dec 2015 19:46:39 +0000
Subject: [PATCH] missing file
---
src/classifier.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/classifier.c b/src/classifier.c
index e243965..8a3ae5a 100644
--- a/src/classifier.c
+++ b/src/classifier.c
@@ -98,6 +98,11 @@
sprintf(buff, "%s/%s_%d.weights",backup_directory,base, epoch);
save_weights(net, buff);
}
+ if(*net.seen%1000 == 0){
+ char buff[256];
+ sprintf(buff, "%s/%s.backup",backup_directory,base);
+ save_weights(net, buff);
+ }
}
char buff[256];
sprintf(buff, "%s/%s.weights", backup_directory, base);
@@ -126,7 +131,7 @@
char *label_list = option_find_str(options, "labels", "data/labels.list");
char *valid_list = option_find_str(options, "valid", "data/train.list");
int classes = option_find_int(options, "classes", 2);
- int topk = option_find_int(options, "topk", 1);
+ int topk = option_find_int(options, "top", 1);
char **labels = get_labels(label_list);
list *plist = get_paths(valid_list);
@@ -189,11 +194,12 @@
list *options = read_data_cfg(datacfg);
- char *label_list = option_find_str(options, "labels", "data/labels.list");
+ char *name_list = option_find_str(options, "names", 0);
+ if(!name_list) name_list = option_find_str(options, "labels", "data/labels.list");
int top = option_find_int(options, "top", 1);
int i = 0;
- char **names = get_labels(label_list);
+ char **names = get_labels(name_list);
clock_t time;
int indexes[10];
char buff[256];
--
Gitblit v1.10.0