From 5052ca8bf03c178d9ae73cb68785cd4afb0144d2 Mon Sep 17 00:00:00 2001
From: 辰冢 <49506152+BruceLee569@users.noreply.github.com>
Date: 星期三, 12 二月 2025 16:13:08 +0800
Subject: [PATCH] Hotwords file needs to specify default utf-8 encoding. (#2379)
---
funasr/schedulers/noam_lr.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/funasr/schedulers/noam_lr.py b/funasr/schedulers/noam_lr.py
index e08fb63..b33b4bd 100644
--- a/funasr/schedulers/noam_lr.py
+++ b/funasr/schedulers/noam_lr.py
@@ -1,4 +1,5 @@
"""Noam learning rate scheduler module."""
+
from typing import Union
import warnings
@@ -56,8 +57,6 @@
def get_lr(self):
step_num = self.last_epoch + 1
return [
- lr
- * self.model_size**-0.5
- * min(step_num**-0.5, step_num * self.warmup_steps**-1.5)
+ lr * self.model_size**-0.5 * min(step_num**-0.5, step_num * self.warmup_steps**-1.5)
for lr in self.base_lrs
]
--
Gitblit v1.9.1