From a0e288f0dca328b8b12592cc19da9bb7c29646f4 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Mon, 30 Apr 2018 23:17:49 +0000
Subject: [PATCH] Increased speed of darknet.py. Fixed functions related to resize_image().
---
src/parser.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/parser.c b/src/parser.c
index ba2cd12..7441ae2 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -291,7 +291,7 @@
for (i = 0; i < len; ++i) {
if (a[i] == ',') ++n;
}
- for (i = 0; i < n; ++i) {
+ for (i = 0; i < n && i < total*2; ++i) {
float bias = atof(a);
l.biases[i] = bias;
a = strchr(a, ',') + 1;
@@ -344,7 +344,7 @@
for(i = 0; i < len; ++i){
if (a[i] == ',') ++n;
}
- for(i = 0; i < n; ++i){
+ for(i = 0; i < n && i < num*2; ++i){
float bias = atof(a);
l.biases[i] = bias;
a = strchr(a, ',')+1;
--
Gitblit v1.10.0