فهرست منبع

fix default val size

Lengyue 2 سال پیش
والد
کامیت
96d07b3194
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      tools/vqgan/create_train_split.py

+ 1 - 1
tools/vqgan/create_train_split.py

@@ -27,7 +27,7 @@ def main(root, val_ratio, val_count, filelist):
 
     if val_count is None and val_ratio is None:
         logger.info("Validation ratio and count not specified, using min(20%, 100)")
-        val_size = min(1, math.ceil(len(files) * 0.2))
+        val_size = min(100, math.ceil(len(files) * 0.2))
     elif val_count is not None and val_ratio is not None:
         logger.error("Cannot specify both val_count and val_ratio")
         return