Unverified Commit 0c34ab90 authored by Rui Xu's avatar Rui Xu Committed by GitHub
Browse files

fix previous bug in save-model (#250)



* flush buffer when saving model

* fix bugs
Co-authored-by: default avatarxurui <xurui4@sensetime.com>
parent d6210e6d
......@@ -249,3 +249,4 @@ def save_checkpoint(model, filename, optimizer=None, meta=None):
# immediately flush buffer
with open(filename, 'wb') as f:
torch.save(checkpoint, f)
f.flush()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment