From 5e448c00f32e80e13eead72318047ce8368aac9a Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Mon, 05 Mar 2018 16:59:29 +0000
Subject: [PATCH] Added Focal loss. Use focal_loss=1 in the [region] layer in your cfg-file. alpha = 0.5, gamma = 2

---
 src/parser.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/parser.c b/src/parser.c
index 1adcd16..9949c50 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -250,6 +250,7 @@
 
 	l.small_object = option_find_int_quiet(options, "small_object", 0);
     l.softmax = option_find_int(options, "softmax", 0);
+	l.focal_loss = option_find_int_quiet(options, "focal_loss", 0);
     //l.max_boxes = option_find_int_quiet(options, "max",30);
     l.jitter = option_find_float(options, "jitter", .2);
     l.rescore = option_find_int_quiet(options, "rescore",0);

--
Gitblit v1.10.0