From 02a6cbfdda55ba2ce13ff0f925009c15cc2a0a90 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 25 Jul 2022 15:44:50 +0200 Subject: [PATCH] Update. --- main.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index ace376d..b579177 100755 --- a/main.py +++ b/main.py @@ -210,11 +210,19 @@ class TaskPicoCLVR(Task): img = [ picoclvr.descr2img(d, height = self.height, width = self.width) for d in descr ] img = torch.cat(img, 0) file_name = f'result_picoclvr_{n_epoch:04d}.png' - torchvision.utils.save_image(img / 255., - file_name, nrow = nb_per_primer, pad_value = 0.8) + torchvision.utils.save_image( + img / 255., + file_name, nrow = nb_per_primer, pad_value = 0.8 + ) log_string(f'wrote {file_name}') - nb_missing = sum( [ x[2] for x in picoclvr.nb_missing_properties(descr, height = self.height, width = self.width) ] ) + nb_missing = sum( [ + x[2] for x in picoclvr.nb_missing_properties( + descr, + height = self.height, width = self.width + ) + ] ) + log_string(f'nb_missing {nb_missing / len(descr):.02f}') ###################################################################### -- 2.20.1