updates
This commit is contained in:
parent
81540b80b9
commit
51d7e460a3
5
train.py
5
train.py
|
@ -170,7 +170,7 @@ def train(cfg,
|
|||
t0 = time.time()
|
||||
for epoch in range(start_epoch, epochs):
|
||||
model.train()
|
||||
print(('\n%8s' + '%10s' * 8) %
|
||||
print(('\n' + '%10s' * 9) %
|
||||
('Epoch', 'gpu_mem', 'GIoU/xy', 'wh', 'obj', 'cls', 'total', 'targets', 'img_size'))
|
||||
|
||||
# Update scheduler
|
||||
|
@ -236,7 +236,8 @@ def train(cfg,
|
|||
# Print batch results
|
||||
mloss = (mloss * i + loss_items) / (i + 1) # update mean losses
|
||||
mem = torch.cuda.memory_cached() / 1E9 if torch.cuda.is_available() else 0 # (GB)
|
||||
s = ('%8s' + '%10.3g' * 8) % ('%g/%g' % (epoch, epochs - 1), mem, *mloss, len(targets), img_size)
|
||||
s = ('%10s' * 2 + '%10.3g' * 7) % (
|
||||
'%g/%g' % (epoch, epochs - 1), '%.3gG' % mem, *mloss, len(targets), img_size)
|
||||
pbar.set_description(s) # print(s)
|
||||
|
||||
# Calculate mAP (always test final epoch, skip first 5 if opt.nosave)
|
||||
|
|
Loading…
Reference in New Issue