Update.
authorFrancois Fleuret <francois@fleuret.org>
Mon, 25 Jul 2022 19:44:26 +0000 (21:44 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Mon, 25 Jul 2022 19:44:26 +0000 (21:44 +0200)
main.py

diff --git a/main.py b/main.py
index f496e99..6c1def7 100755 (executable)
--- 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(