Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Mar 15, 2020
1 parent 8ffc2b0 commit 92e6e8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
if (dim_w < net.resize_step) dim_w = net.resize_step;
if (dim_h < net.resize_step) dim_h = net.resize_step;
int dim_b = (init_b * max_dim_w * max_dim_h) / (dim_w * dim_h);
int new_dim_b = (int)(dim_b * 0.9);
int new_dim_b = (int)(dim_b * 0.8);
if (new_dim_b > init_b) dim_b = new_dim_b;

args.w = dim_w;
Expand Down
3 changes: 3 additions & 0 deletions src/yolo_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ void forward_yolo_layer(const layer l, network_state state)
}
}

if (count == 0) count = 1;
if (class_count == 0) class_count = 1;

//*(l.cost) = pow(mag_array(l.delta, l.outputs * l.batch), 2);
//printf("Region %d Avg IOU: %f, Class: %f, Obj: %f, No Obj: %f, .5R: %f, .75R: %f, count: %d\n", state.index, avg_iou / count, avg_cat / class_count, avg_obj / count, avg_anyobj / (l.w*l.h*l.n*l.batch), recall / count, recall75 / count, count);

Expand Down

0 comments on commit 92e6e8e

Please sign in to comment.