Unverified 提交 fd004f56 authored 作者: Yana's avatar Yana 提交者: GitHub

Fix bug with resume (#8912)

* Fix bug with resume * restore del on resume=false * Update train.py Co-authored-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com>
上级 d1dfcab6
...@@ -167,6 +167,7 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio ...@@ -167,6 +167,7 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
# Resume # Resume
best_fitness, start_epoch = 0.0, 0 best_fitness, start_epoch = 0.0, 0
if pretrained: if pretrained:
if resume:
best_fitness, start_epoch, epochs = smart_resume(ckpt, optimizer, ema, weights, epochs, resume) best_fitness, start_epoch, epochs = smart_resume(ckpt, optimizer, ema, weights, epochs, resume)
del ckpt, csd del ckpt, csd
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论