mirror of https://github.com/AlexeyAB/darknet.git
fix: flush buffer to weights-file when writing each layer (#7747)
Co-authored-by: Double.c <double.c@inwinstack.com>
This commit is contained in:
parent
00b8e29b68
commit
396b5299a7
|
@ -2026,6 +2026,7 @@ void save_weights_upto(network net, char *filename, int cutoff, int save_ema)
|
|||
fwrite(l.biases, sizeof(float), l.outputs, fp);
|
||||
fwrite(l.weights, sizeof(float), size, fp);
|
||||
}
|
||||
fflush(fp);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue