feat(train): 添加模型保存路径打印功能
- 优化模型保存逻辑,将保存路径存储在变量中 - 在保存模型后,打印模型的保存路径 - 这个改动可以帮助用户更容易地找到和管理训练好的模型文件
This commit is contained in:
parent
0ef5760d76
commit
6738c9057d
4
train.py
4
train.py
@ -258,5 +258,7 @@ if True:
|
||||
'BaseFuseLayer': BaseFuseLayer.state_dict(),
|
||||
'DetailFuseLayer': DetailFuseLayer.state_dict(),
|
||||
}
|
||||
torch.save(checkpoint, os.path.join("models/whaiFusion"+timestamp+'.pth'))
|
||||
savepth = os.path.join("models/whaiFusion" + timestamp + '.pth');
|
||||
torch.save(checkpoint, savepth)
|
||||
print("save model:{}".format(savepth))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user