返回训练终止信号 isfinish=2

This commit is contained in:
JIAKUNHAO 2022-11-23 14:31:00 +08:00
parent 82b1c4febb
commit 9818a1d488

View File

@ -326,6 +326,8 @@ def train(hyp, opt, device, data_list,id,callbacks): # hyp is path/to/hyp.yaml
report.progress = (i + 1) report.progress = (i + 1)
report.end_time = datetime.now() report.end_time = datetime.now()
report.precision[0].value.append(reportAccu) report.precision[0].value.append(reportAccu)
if (i+1) == num_epochs:
report.isfinish = 2
return report.dict() return report.dict()
###################结束####################### ###################结束#######################
for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------ for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------