From 6427c834dfd97b1f05c6659cdc7ccf010bf82fe1 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期一, 24 四月 2023 19:50:07 +0800
Subject: [PATCH] update
---
funasr/bin/train.py | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/funasr/bin/train.py b/funasr/bin/train.py
index 26e0e6a..9c8f672 100755
--- a/funasr/bin/train.py
+++ b/funasr/bin/train.py
@@ -19,6 +19,7 @@
from funasr.torch_utils.model_summary import model_summary
from funasr.torch_utils.pytorch_version import pytorch_cudnn_version
from funasr.torch_utils.set_all_random_seed import set_all_random_seed
+from funasr.utils.nested_dict_action import NestedDictAction
from funasr.utils.prepare_data import prepare_data
from funasr.utils.types import str2bool
from funasr.utils.types import str_or_none
@@ -302,6 +303,32 @@
help="Apply preprocessing to data or not",
)
+ # optimization related
+ parser.add_argument(
+ "--optim",
+ type=lambda x: x.lower(),
+ default="adam",
+ help="The optimizer type",
+ )
+ parser.add_argument(
+ "--optim_conf",
+ action=NestedDictAction,
+ default=dict(),
+ help="The keyword arguments for optimizer",
+ )
+ parser.add_argument(
+ "--scheduler",
+ type=lambda x: str_or_none(x.lower()),
+ default=None,
+ help="The lr scheduler type",
+ )
+ parser.add_argument(
+ "--scheduler_conf",
+ action=NestedDictAction,
+ default=dict(),
+ help="The keyword arguments for lr scheduler",
+ )
+
# most task related
parser.add_argument(
"--init",
--
Gitblit v1.9.1