From c4b9bf22d38a2c9184ef693ff24bab4e201e26f2 Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Sun, 22 Aug 2021 10:39:23 -0400 Subject: [PATCH] Adding blanks to make the codes look better --- tools/eval_metric.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/eval_metric.py b/tools/eval_metric.py index f57815a2..acf7ace1 100644 --- a/tools/eval_metric.py +++ b/tools/eval_metric.py @@ -129,13 +129,15 @@ def evaluate(model, data_loader, coco_evaluator, device, print_freq): if torch.cuda.is_available(): torch.cuda.synchronize() - model_time = time.time() + model_time = time.time() preds = model(images) model_time = time.time() - model_time + evaluator_time = time.time() coco_evaluator.update(preds, targets) evaluator_time = time.time() - evaluator_time + metric_logger.update(model_time=model_time, evaluator_time=evaluator_time) # gather the stats from all processes