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