updates
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
cca17f4d1e
commit
94234c80b2
7
train.py
7
train.py
|
@ -202,10 +202,6 @@ def train():
|
|||
model.train()
|
||||
print(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'GIoU', 'obj', 'cls', 'total', 'targets', 'img_size'))
|
||||
|
||||
# Update scheduler
|
||||
if epoch > 0:
|
||||
scheduler.step()
|
||||
|
||||
# Freeze backbone at epoch 0, unfreeze at epoch 1 (optional)
|
||||
freeze_backbone = False
|
||||
if freeze_backbone and epoch < 2:
|
||||
|
@ -286,6 +282,9 @@ def train():
|
|||
|
||||
# end batch ------------------------------------------------------------------------------------------------
|
||||
|
||||
# Update scheduler
|
||||
scheduler.step()
|
||||
|
||||
# Process epoch results
|
||||
final_epoch = epoch + 1 == epochs
|
||||
if opt.prebias:
|
||||
|
|
Loading…
Reference in New Issue