From d80ac2fd2df4e7fb8a28acfa512bb11472b5cc99 Mon Sep 17 00:00:00 2001
From: liugz18 <57401541+liugz18@users.noreply.github.com>
Date: 星期四, 18 七月 2024 21:34:55 +0800
Subject: [PATCH] Rename 'res' in line 514 to avoid with naming conflict with line 365
---
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