From 1e9d1fcedf1a361bcdb384f15b5b14bdb526576d Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sat, 30 Jun 2018 20:12:25 +0000
Subject: [PATCH] Fixed arch=compute_53,code=[sm_53,compute_53] for Jetson TX1

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

diff --git a/src/yolo_layer.c b/src/yolo_layer.c
index 87dedae..f79bc41 100644
--- a/src/yolo_layer.c
+++ b/src/yolo_layer.c
@@ -201,7 +201,11 @@
                     for(t = 0; t < l.max_boxes; ++t){
                         box truth = float_to_box_stride(state.truth + t*(4 + 1) + b*l.truths, 1);
 						int class_id = state.truth[t*(4 + 1) + 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. In txt-labels class_id should be [from 0 to %d] \n", class_id, l.classes, l.classes - 1);
+							getchar();
+							continue; // if label contains class_id more than number of classes in the cfg-file
+						}
                         if(!truth.x) break;
                         float iou = box_iou(pred, truth);
                         if (iou > best_iou) {

--
Gitblit v1.10.0