From cf36ce977c0b8bd54c906e63ce31931ac060178f Mon Sep 17 00:00:00 2001
From: anyvoice <130631963+anyvoiceai@users.noreply.github.com>
Date: 星期日, 02 七月 2023 09:12:18 +0800
Subject: [PATCH] Creates tensor in target device to avoid high CPU occupation. (#695)

---
 funasr/datasets/large_datasets/datapipes/batch.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/funasr/datasets/large_datasets/datapipes/batch.py b/funasr/datasets/large_datasets/datapipes/batch.py
index c980ae3..8ec43e9 100644
--- a/funasr/datasets/large_datasets/datapipes/batch.py
+++ b/funasr/datasets/large_datasets/datapipes/batch.py
@@ -46,6 +46,7 @@
         batch = []
         bucket = []
         max_lengths = 0
+        min_lengths = 999999
         batch_lengths = 0
 
         if self.batch_mode == "clipping":

--
Gitblit v1.9.1