From 0dbca4cef7405fb92689e5d2542f1d4761d658a3 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 25 Jul 2022 21:44:26 +0200 Subject: [PATCH] Update. --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index f496e99..6c1def7 100755 --- a/main.py +++ b/main.py @@ -155,6 +155,7 @@ class TaskPicoCLVR(Task): self.train_descr = generate_descr((nb * 4) // 5) self.test_descr = generate_descr((nb * 1) // 5) + # Build the tokenizer tokens = set() for d in [ self.train_descr, self.test_descr ]: for s in d: @@ -215,12 +216,12 @@ 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' + image_name = f'result_picoclvr_{n_epoch:04d}.png' torchvision.utils.save_image( img / 255., - file_name, nrow = nb_per_primer, pad_value = 0.8 + image_name, nrow = nb_per_primer, pad_value = 0.8 ) - log_string(f'wrote {file_name}') + log_string(f'wrote {image_name}') nb_missing = sum( [ x[2] for x in picoclvr.nb_missing_properties( -- 2.39.5