This commit is contained in:
Glenn Jocher 2019-04-26 14:49:40 +02:00
parent 0bed0a9a0e
commit 5263608d12
1 changed files with 3 additions and 1 deletions

View File

@ -143,7 +143,7 @@ def train(
model, optimizer = amp.initialize(model, optimizer, opt_level='O1') model, optimizer = amp.initialize(model, optimizer, opt_level='O1')
# Start training # Start training
t = time.time() t, t0 = time.time(), time.time()
model.hyp = hyp # attach hyperparameters to model model.hyp = hyp # attach hyperparameters to model
model_info(model) model_info(model)
nb = len(dataloader) nb = len(dataloader)
@ -255,6 +255,8 @@ def train(
# Delete checkpoint # Delete checkpoint
del chkpt del chkpt
dt = (time.time() - t0) / 3600
print('%g epochs completed in %.3f hours.' % (epoch - start_epoch, dt))
return results return results