Skip to content
Snippets Groups Projects
Commit afe24532 authored by Joseph Redmon's avatar Joseph Redmon
Browse files

Better load messaging

parent ae43771c
No related branches found
No related tags found
No related merge requests found
......@@ -514,7 +514,8 @@ void save_weights(network net, char *filename)
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 @@ void load_weights_upto(network *net, char *filename, int cutoff)
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 @@ void load_weights_upto(network *net, char *filename, int cutoff)
#endif
}
}
fprintf(stderr, "Done!\n");
fclose(fp);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment