diff --git a/src/parser.c b/src/parser.c index 68a9f049..8051fd7f 100644 --- a/src/parser.c +++ b/src/parser.c @@ -813,7 +813,7 @@ void load_weights_upto(network *net, char *filename, int cutoff) { fprintf(stderr, "Loading weights from %s...", filename); fflush(stdout); - FILE *fp = fopen(filename, "r"); + FILE *fp = fopen(filename, "rb"); if(!fp) file_error(filename); int major;