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

diff --git a/main.py b/main.py
index ace376d..b579177 100755 (executable)
--- 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}')
 
 ######################################################################