From 172e7ac986f299ad545cbd91a8cecc3ef967af36 Mon Sep 17 00:00:00 2001 From: zhifu gao <zhifu.gzf@alibaba-inc.com> Date: 星期一, 11 十二月 2023 10:17:22 +0800 Subject: [PATCH] Revert "Dev gzf funasr2" (#1164) --- funasr/datasets/data_sampler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/funasr/datasets/data_sampler.py b/funasr/datasets/data_sampler.py index 60c7c84..c8e7b0d 100644 --- a/funasr/datasets/data_sampler.py +++ b/funasr/datasets/data_sampler.py @@ -46,8 +46,8 @@ idx_map = self.shuffle_idx[idx] # prompt = self.dataset.indexed_dataset[idx_map]["prompt"] - sample_len_cur = self.dataset.indexed_dataset.get_source_len(self.dataset.indexed_dataset[idx_map]) + \ - self.dataset.indexed_dataset.get_target_len(self.dataset.indexed_dataset[idx_map]) + sample_len_cur = self.dataset.indexed_dataset[idx_map]["source_len"] + \ + self.dataset.indexed_dataset[idx_map]["target_len"] datalen_with_index.append([idx, sample_len_cur]) -- Gitblit v1.9.1