From 3f487c42904a27deeae4ab48cf8ccc45537263d1 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 31 一月 2024 16:21:10 +0800
Subject: [PATCH] funasr1.0.5 (#1328)

---
 funasr/datasets/audio_datasets/samplers.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/funasr/datasets/audio_datasets/samplers.py b/funasr/datasets/audio_datasets/samplers.py
index e170c68..0d93098 100644
--- a/funasr/datasets/audio_datasets/samplers.py
+++ b/funasr/datasets/audio_datasets/samplers.py
@@ -28,7 +28,7 @@
         self.shuffle = shuffle and is_training
     
     def __len__(self):
-        return self.total_samples
+        return (self.total_samples-1) // self.batch_size + 1
     
     def set_epoch(self, epoch):
         np.random.seed(epoch)

--
Gitblit v1.9.1