From d1d56a2a72247ef080eb124ce6605f3218ce4295 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 10 Jul 2015 23:38:07 +0000
Subject: [PATCH] Added alexnet cfg
---
src/utils.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/utils.c b/src/utils.c
index bc39cec..63664ec 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -18,8 +18,6 @@
c = next+1;
}
c = copy_string(c);
- next = strchr(c, '_');
- if (next) *next = 0;
next = strchr(c, '.');
if (next) *next = 0;
return c;
@@ -73,11 +71,11 @@
void top_k(float *a, int n, int k, int *index)
{
int i,j;
- for(j = 0; j < k; ++j) index[j] = 0;
+ for(j = 0; j < k; ++j) index[j] = -1;
for(i = 0; i < n; ++i){
int curr = i;
for(j = 0; j < k; ++j){
- if(a[curr] > a[index[j]]){
+ if((index[j] < 0) || a[curr] > a[index[j]]){
int swap = curr;
curr = index[j];
index[j] = swap;
--
Gitblit v1.10.0