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/region_layer.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/region_layer.c b/src/region_layer.c
index 4aff75a..62c8b34 100644
--- a/src/region_layer.c
+++ b/src/region_layer.c
@@ -136,8 +136,9 @@
 
 			int ti = index + class_id;
 			float pt = output[ti] + 0.000000000000001F;
-			//float grad = -(1 - pt) * (2 * pt*logf(pt) + pt - 1);	// http://blog.csdn.net/linmingan/article/details/77885832	
-			float grad = (1 - pt) * (2 * pt*logf(pt) + pt - 1);		// https://github.com/unsky/focal-loss
+			// http://fooplot.com/#W3sidHlwZSI6MCwiZXEiOiItKDEteCkqKDIqeCpsb2coeCkreC0xKSIsImNvbG9yIjoiIzAwMDAwMCJ9LHsidHlwZSI6MTAwMH1d
+			float grad = -(1 - pt) * (2 * pt*logf(pt) + pt - 1);	// http://blog.csdn.net/linmingan/article/details/77885832	
+			//float grad = (1 - pt) * (2 * pt*logf(pt) + pt - 1);	// https://github.com/unsky/focal-loss
 
 			for (n = 0; n < classes; ++n) {
 				delta[index + n] = scale * (((n == class_id) ? 1 : 0) - output[index + n]);

--
Gitblit v1.10.0