From eedc4231b0f4ec1c6ab22fac163b1512d7e7f4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=98=89=E6=B8=8A?= Date: Thu, 27 Jul 2023 16:02:38 +0800 Subject: [PATCH] update --- funasr/datasets/small_datasets/sequence_iter_factory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/funasr/datasets/small_datasets/sequence_iter_factory.py b/funasr/datasets/small_datasets/sequence_iter_factory.py index 3ebcc5ac6..8ad72d765 100644 --- a/funasr/datasets/small_datasets/sequence_iter_factory.py +++ b/funasr/datasets/small_datasets/sequence_iter_factory.py @@ -66,8 +66,9 @@ class SequenceIterFactory(AbsIterFactory): batch_bins=dataset_conf["batch_conf"]["batch_size"] * args.ngpu, shape_files=shape_files, sort_in_batch=dataset_conf["sort_in_batch"] if hasattr(dataset_conf, "sort_in_batch") else "descending", - sort_batch=dataset_conf["sort_batch"] if hasattr(dataset_conf, "sort_batch") else "ascending", + sort_batch=dataset_conf["sort_batch"] if hasattr(dataset_conf, "sort_batch") else "descending", drop_last=False, + min_batch_size=torch.distributed.get_world_size(), padding=True, )