AlexeyAB
2018-03-16 164ba34279a4d486d6e49409de791817b62ad1ac
Fixed bug, that save weights-file for each iteration
4 files modified
18 ■■■■ changed files
build/darknet/x64/resnet152_yolo.cfg 4 ●●●● patch | view | raw | blame | history
build/darknet/x64/resnet50_yolo.cfg 4 ●●●● patch | view | raw | blame | history
src/demo.c 1 ●●●● patch | view | raw | blame | history
src/detector.c 9 ●●●●● patch | view | raw | blame | history
build/darknet/x64/resnet152_yolo.cfg
@@ -1,6 +1,6 @@
[net]
batch=64
subdivisions=8
subdivisions=32
height=416
width=416
channels=3
@@ -1470,4 +1470,4 @@
absolute=1
thresh = .6
random=0
random=1
build/darknet/x64/resnet50_yolo.cfg
@@ -1,6 +1,6 @@
[net]
batch=64
subdivisions=8
subdivisions=32
height=416
width=416
channels=3
@@ -517,4 +517,4 @@
absolute=1
thresh = .6
random=0
random=1
src/demo.c
@@ -143,6 +143,7 @@
        printf("video file: %s\n", filename);
        cap = cvCaptureFromFile(filename);
    }else{
        printf("Webcam index: %d\n", cam_index);
        cap = cvCaptureFromCAM(cam_index);
    }
src/detector.c
@@ -43,9 +43,6 @@
    float avg_loss = -1;
    network *nets = calloc(ngpus, sizeof(network));
    int iter_save;
    iter_save = 100;
    srand(time(0));
    int seed = rand();
    int i;
@@ -79,6 +76,8 @@
    int init_w = net.w;
    int init_h = net.h;
    int iter_save;
    iter_save = get_current_batch(net);
    load_args args = {0};
    args.w = net.w;
@@ -180,8 +179,8 @@
        //if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) {
        //if (i % 100 == 0) {
        if(i >= iter_save) {
            iter_save += 100;
        if(i >= (iter_save + 100)) {
            iter_save = i;
#ifdef GPU
            if (ngpus != 1) sync_nets(nets, ngpus, 0);
#endif