Joseph Redmon
2015-06-11 11c72b1132feca7c1252ea01d02da4cb497e723f
src/parser.c
@@ -164,10 +164,11 @@
{
    int coords = option_find_int(options, "coords", 1);
    int classes = option_find_int(options, "classes", 1);
    int rescore = option_find_int(options, "rescore", 1);
    int nuisance = option_find_int(options, "nuisance", 0);
    int background = option_find_int(options, "background", 1);
    detection_layer layer = make_detection_layer(params.batch, params.inputs, classes, coords, rescore, background, nuisance);
    int rescore = option_find_int(options, "rescore", 0);
    int joint = option_find_int(options, "joint", 0);
    int objectness = option_find_int(options, "objectness", 0);
    int background = option_find_int(options, "background", 0);
    detection_layer layer = make_detection_layer(params.batch, params.inputs, classes, coords, joint, rescore, background, objectness);
    option_unused(options);
    return layer;
}
@@ -513,7 +514,8 @@
void load_weights_upto(network *net, char *filename, int cutoff)
{
    fprintf(stderr, "Loading weights from %s\n", filename);
    fprintf(stderr, "Loading weights from %s...", filename);
    fflush(stdout);
    FILE *fp = fopen(filename, "r");
    if(!fp) file_error(filename);
@@ -521,7 +523,6 @@
    fread(&net->momentum, sizeof(float), 1, fp);
    fread(&net->decay, sizeof(float), 1, fp);
    fread(&net->seen, sizeof(int), 1, fp);
    fprintf(stderr, "%f %f %f %d\n", net->learning_rate, net->momentum, net->decay, net->seen);
    int i;
    for(i = 0; i < net->n && i < cutoff; ++i){
@@ -556,6 +557,7 @@
#endif
        }
    }
    fprintf(stderr, "Done!\n");
    fclose(fp);
}