@@ -502,35 +502,6 @@ def main():
502502 parser .error ('--naflex-loader and --train-img-sizes are alternative loader modes.' )
503503 if args .naflex_loader and args .use_multi_epochs_loader :
504504 parser .error ('--use-multi-epochs-loader is not supported with --naflex-loader.' )
505- if args .train_img_sizes is not None and args .use_multi_epochs_loader :
506- parser .error ('--use-multi-epochs-loader is not supported with --train-img-sizes.' )
507- if args .train_img_sizes is not None :
508- if any (size <= 0 for size in args .train_img_sizes ):
509- parser .error ('--train-img-sizes values must be positive.' )
510- if args .train_batch_sizes is not None :
511- if len (args .train_batch_sizes ) != len (args .train_img_sizes ):
512- parser .error ('--train-batch-sizes must have the same length as --train-img-sizes.' )
513- if any (batch_size <= 0 for batch_size in args .train_batch_sizes ):
514- parser .error ('--train-batch-sizes values must be positive.' )
515- if args .train_size_probs is not None :
516- if len (args .train_size_probs ) != len (args .train_img_sizes ):
517- parser .error ('--train-size-probs must have the same length as --train-img-sizes.' )
518- probs = torch .tensor (args .train_size_probs )
519- if not torch .isfinite (probs ).all () or (probs < 0 ).any () or probs .sum () <= 0 :
520- parser .error ('--train-size-probs must be finite, non-negative, and have a positive sum.' )
521- if args .aug_splits > 0 :
522- parser .error ('Augmentation splits are not supported with scheduled resolution training.' )
523- if args .train_size_schedule == 'progressive' :
524- if len (args .train_img_sizes ) < 2 :
525- parser .error ('Progressive resolution training requires at least two --train-img-sizes values.' )
526- if args .epochs <= 0 :
527- parser .error ('--epochs must be positive for progressive resolution training.' )
528- if args .train_size_schedule_spread < 0 :
529- parser .error ('--train-size-schedule-spread must be non-negative.' )
530- if not 0 <= args .train_size_random_mix <= 1 :
531- parser .error ('--train-size-random-mix must be between 0 and 1.' )
532- if args .train_batches_per_epoch is not None and args .train_batches_per_epoch <= 0 :
533- parser .error ('--train-batches-per-epoch must be positive.' )
534505 device = utils .init_distributed_device (args )
535506 if args .distributed :
536507 _logger .info (
0 commit comments