From ac7256d4a39c00e4d36872610ec20dcb6d460d2e Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 3 Dec 2020 23:42:29 -0700 Subject: [PATCH] Do tqdm reporting when calculating flow_gaussian_nll --- codes/models/eval/flow_gaussian_nll.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codes/models/eval/flow_gaussian_nll.py b/codes/models/eval/flow_gaussian_nll.py index 2405a70d..f887b7c3 100644 --- a/codes/models/eval/flow_gaussian_nll.py +++ b/codes/models/eval/flow_gaussian_nll.py @@ -4,6 +4,7 @@ import torch import os.path as osp import torchvision from torch.utils.data import DataLoader +from tqdm import tqdm import models.eval.evaluator as evaluator from pytorch_fid import fid_score @@ -25,7 +26,8 @@ class FlowGaussianNll(evaluator.Evaluator): total_zs = 0 z_loss = 0 with torch.no_grad(): - for batch in self.dataloader: + print("Evaluating FlowGaussianNll..") + for batch in tqdm(self.dataloader): z, _, _ = self.model(gt=batch['GT'], lr=batch['LQ'], epses=[],