From 1a35f49ab3ae9d74b636de8580e07ab072846ea9 Mon Sep 17 00:00:00 2001
From: Alexey <AlexeyAB@users.noreply.github.com>
Date: Thu, 31 May 2018 11:19:42 +0000
Subject: [PATCH] Merge pull request #950 from IlyaOvodov/Fix_size_PR

---
 src/region_layer.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/region_layer.c b/src/region_layer.c
index 9d5fd72..a2ca440 100644
--- a/src/region_layer.c
+++ b/src/region_layer.c
@@ -296,7 +296,10 @@
         for(t = 0; t < l.max_boxes; ++t){
             box truth = float_to_box(state.truth + t*5 + b*l.truths);
 			int class_id = state.truth[t * 5 + b*l.truths + 4];
-			if (class_id >= l.classes) continue; // if label contains class_id more than number of classes in the cfg-file
+			if (class_id >= l.classes) {
+				printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes);
+				continue; // if label contains class_id more than number of classes in the cfg-file
+			}
 
             if(!truth.x) break;
             float best_iou = 0;

--
Gitblit v1.10.0