From: Francois Fleuret Date: Mon, 25 Jul 2022 13:44:50 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=02a6cbfdda55ba2ce13ff0f925009c15cc2a0a90;p=mygpt.git Update. --- 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}') ######################################################################