diff --git a/src/layer.c b/src/layer.c index 6749f1b0..c76a16ff 100644 --- a/src/layer.c +++ b/src/layer.c @@ -54,6 +54,7 @@ void free_layer(layer l) if (l.r_cpu) free(l.r_cpu); if (l.h_cpu) free(l.h_cpu); if (l.binary_input) free(l.binary_input); + if (l.loss) free(l.loss); #ifdef GPU if (l.indexes_gpu) cuda_free((float *)l.indexes_gpu); diff --git a/src/yolo_layer.c b/src/yolo_layer.c index d5ba8d8a..090b4721 100644 --- a/src/yolo_layer.c +++ b/src/yolo_layer.c @@ -374,7 +374,7 @@ int get_yolo_detections(layer l, int w, int h, int netw, int neth, float thresh, for(n = 0; n < l.n; ++n){ int obj_index = entry_index(l, 0, n*l.w*l.h + i, 4); float objectness = predictions[obj_index]; - //if(objectness <= thresh) continue; + //if(objectness <= thresh) continue; // incorrect behavior for Nan values if (objectness > thresh) { int box_index = entry_index(l, 0, n*l.w*l.h + i, 0); dets[count].bbox = get_yolo_box(predictions, l.biases, l.mask[n], box_index, col, row, l.w, l.h, netw, neth, l.w*l.h);