|
|
@ -723,7 +723,7 @@ def train_one_epoch(
|
|
|
|
if hasattr(optimizer, 'sync_lookahead'):
|
|
|
|
if hasattr(optimizer, 'sync_lookahead'):
|
|
|
|
optimizer.sync_lookahead()
|
|
|
|
optimizer.sync_lookahead()
|
|
|
|
|
|
|
|
|
|
|
|
return OrderedDict([('train_loss', losses_m.avg)])
|
|
|
|
return OrderedDict([('loss', losses_m.avg)])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def validate(model, loader, loss_fn, args, amp_autocast=suppress, log_suffix=''):
|
|
|
|
def validate(model, loader, loss_fn, args, amp_autocast=suppress, log_suffix=''):
|
|
|
@ -785,7 +785,7 @@ def validate(model, loader, loss_fn, args, amp_autocast=suppress, log_suffix='')
|
|
|
|
log_name, batch_idx, last_idx, batch_time=batch_time_m,
|
|
|
|
log_name, batch_idx, last_idx, batch_time=batch_time_m,
|
|
|
|
loss=losses_m, top1=top1_m, top5=top5_m))
|
|
|
|
loss=losses_m, top1=top1_m, top5=top5_m))
|
|
|
|
|
|
|
|
|
|
|
|
metrics = OrderedDict([('val_loss', losses_m.avg), ('top1', top1_m.avg), ('top5', top5_m.avg)])
|
|
|
|
metrics = OrderedDict([('loss', losses_m.avg), ('top1', top1_m.avg), ('top5', top5_m.avg)])
|
|
|
|
|
|
|
|
|
|
|
|
return metrics
|
|
|
|
return metrics
|
|
|
|
|
|
|
|
|
|
|
|