| | |
| | | detection_layer layer = get_network_detection_layer(net); |
| | | printf("Learning Rate: %g, Momentum: %g, Decay: %g\n", net.learning_rate, net.momentum, net.decay); |
| | | int imgs = 128; |
| | | int i = net.seen/imgs; |
| | | int i = *net.seen/imgs; |
| | | |
| | | char **paths; |
| | | list *plist = get_paths(train_images); |
| | |
| | | printf("Loaded: %lf seconds\n", sec(clock()-time)); |
| | | time=clock(); |
| | | float loss = train_network(net, train); |
| | | net.seen += imgs; |
| | | if (avg_loss < 0) avg_loss = loss; |
| | | avg_loss = avg_loss*.9 + loss*.1; |
| | | |
| | |
| | | |
| | | pthread_join(load_thread, 0); |
| | | free_data(buffer); |
| | | args.background = background; |
| | | load_thread = load_data_in_thread(args); |
| | | } |
| | | |
| | |
| | | int w = val[t].w; |
| | | int h = val[t].h; |
| | | convert_yolo_detections(predictions, classes, objectness, background, num_boxes, w, h, thresh, probs, boxes); |
| | | if (nms) do_nms(boxes, probs, num_boxes, classes, iou_thresh); |
| | | if (nms) do_nms(boxes, probs, num_boxes*num_boxes, classes, iou_thresh); |
| | | print_yolo_detections(fps, id, boxes, probs, num_boxes, classes, w, h); |
| | | free(id); |
| | | free_image(val[t]); |