Minor fix

This commit is contained in:
AlexeyAB
2018-10-28 23:58:08 +03:00
parent 31df5e2735
commit 08e8e0c8c2
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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);