From b3fb4c0acd5f52a313f024b6f69b8f025c6eddfe Mon Sep 17 00:00:00 2001
From: ming030890 <67713085+ming030890@users.noreply.github.com>
Date: 星期二, 05 八月 2025 17:48:10 +0800
Subject: [PATCH] Allow one to set a custom progress callback (#2609)
---
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