瀏覽代碼

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:
     if val_count is None and val_ratio is None:
         logger.info("Validation ratio and count not specified, using min(20%, 100)")
         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:
     elif val_count is not None and val_ratio is not None:
         logger.error("Cannot specify both val_count and val_ratio")
         logger.error("Cannot specify both val_count and val_ratio")
         return
         return