From 476dc3f30c014e0d2ebdc46ce0283ddbfe63eeb8 Mon Sep 17 00:00:00 2001
From: VirtuosoQ <2416050435@qq.com>
Date: 星期日, 28 四月 2024 16:37:54 +0800
Subject: [PATCH] 16:37 java_http_client
---
funasr/losses/label_smoothing_loss.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/losses/label_smoothing_loss.py b/funasr/losses/label_smoothing_loss.py
index 8f0809a..385025d 100644
--- a/funasr/losses/label_smoothing_loss.py
+++ b/funasr/losses/label_smoothing_loss.py
@@ -50,8 +50,8 @@
"""
assert x.size(2) == self.size
batch_size = x.size(0)
- x = x.view(-1, self.size)
- target = target.view(-1)
+ x = x.contiguous().view(-1, self.size)
+ target = target.contiguous().view(-1)
with torch.no_grad():
true_dist = x.clone()
true_dist.fill_(self.smoothing / (self.size - 1))
--
Gitblit v1.9.1