summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--training/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/training/util.py b/training/util.py
index a80e44f..5c056a6 100644
--- a/training/util.py
+++ b/training/util.py
@@ -74,7 +74,7 @@ class CheckpointerBase:
74 generator=generator, 74 generator=generator,
75 ) 75 )
76 76
77 grid_cols = max(self.sample_batch_size, 4) 77 grid_cols = min(self.sample_batch_size, 4)
78 grid_rows = (self.sample_batches * self.sample_batch_size) // grid_cols 78 grid_rows = (self.sample_batches * self.sample_batch_size) // grid_cols
79 79
80 with torch.autocast("cuda"), torch.inference_mode(): 80 with torch.autocast("cuda"), torch.inference_mode():