Drop unrelated checkpoint helper change from PR

This commit is contained in:
东云 2026-04-18 14:59:30 +08:00
parent 96b8701186
commit e8c53643e7

View File

@ -69,8 +69,7 @@ def my_save(fea, path): #####fix issue: torch.save doesn't support chinese path
name = os.path.basename(path)
tmp_path = "%s.pth" % (ttime())
torch.save(fea, tmp_path)
os.makedirs(dir, exist_ok=True)
os.replace(tmp_path, "%s/%s" % (dir, name))
shutil.move(tmp_path, "%s/%s" % (dir, name))
def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path):