From b63e73ae4f5df9d4ed9fb0bee12ac2cc09d7f523 Mon Sep 17 00:00:00 2001
From: zhaomingwork <zhaomingwork@qq.com>
Date: 星期五, 19 五月 2023 14:30:13 +0800
Subject: [PATCH] add asr wss address input to html
---
funasr/models/pooling/statistic_pooling.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/funasr/models/pooling/statistic_pooling.py b/funasr/models/pooling/statistic_pooling.py
index 97f8a24..39d94be 100644
--- a/funasr/models/pooling/statistic_pooling.py
+++ b/funasr/models/pooling/statistic_pooling.py
@@ -82,10 +82,10 @@
tt = xs_pad.shape[2]
num_chunk = int(math.ceil(tt / pooling_stride))
pad = pooling_size // 2
- if xs_pad.shape == 4:
- features = F.pad(xs_pad, (0, 0, pad, pad), "reflect")
+ if len(xs_pad.shape) == 4:
+ features = F.pad(xs_pad, (0, 0, pad, pad), "replicate")
else:
- features = F.pad(xs_pad, (pad, pad), "reflect")
+ features = F.pad(xs_pad, (pad, pad), "replicate")
stat_list = []
for i in range(num_chunk):
--
Gitblit v1.9.1