Joseph Redmon
2015-06-10 afe245329bdd14f36ca773fd7d497fc628b0535a
Better load messaging
1 files modified
5 ■■■■■ changed files
src/parser.c 5 ●●●●● patch | view | raw | blame | history
src/parser.c
@@ -514,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);
@@ -522,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){
@@ -557,6 +557,7 @@
#endif
        }
    }
    fprintf(stderr, "Done!\n");
    fclose(fp);
}