From 1b001a7f58aacc7f8b751332d3a9d6d6d0200a2d Mon Sep 17 00:00:00 2001 From: Joseph Redmon Date: Wed, 20 Sep 2017 19:17:27 -0700 Subject: [PATCH] :bug: :bug: :bug: --- src/tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tree.c b/src/tree.c index f36ca3a1..67b6d431 100644 --- a/src/tree.c +++ b/src/tree.c @@ -71,6 +71,8 @@ int hierarchy_top_prediction(float *predictions, tree *hier, float thresh, int s p = p*max; group = hier->child[max_i]; if(hier->child[max_i] < 0) return max_i; + } else if (group == 0){ + return max_i; } else { return hier->parent[hier->group_offset[group]]; }