diff --git a/library/train_util.py b/library/train_util.py index 100ef475d..878b1cd2a 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -245,7 +245,7 @@ def select_bucket(self, image_width, image_height): if reso in self.predefined_resos_set: pass else: - ar_errors = self.predefined_aspect_ratios - aspect_ratio + ar_errors = np.log(self.predefined_aspect_ratios) - np.log(aspect_ratio) predefined_bucket_id = np.abs(ar_errors).argmin() # 当該解像度以外でaspect ratio errorが最も少ないもの reso = self.predefined_resos[predefined_bucket_id]