From acb19cf4650858f84b7d73e164409432965573ce Mon Sep 17 00:00:00 2001 From: Zhangjingyu06 Date: Tue, 24 May 2022 12:31:05 +0000 Subject: [PATCH] deepspeech2 modify for kunlun --- paddlespeech/s2t/exps/deepspeech2/bin/export.py | 1 + paddlespeech/s2t/exps/deepspeech2/bin/test.py | 1 + paddlespeech/s2t/exps/deepspeech2/bin/test_export.py | 1 + paddlespeech/s2t/exps/deepspeech2/bin/train.py | 1 + 4 files changed, 4 insertions(+) diff --git a/paddlespeech/s2t/exps/deepspeech2/bin/export.py b/paddlespeech/s2t/exps/deepspeech2/bin/export.py index f1b84969d84..62bf191df36 100644 --- a/paddlespeech/s2t/exps/deepspeech2/bin/export.py +++ b/paddlespeech/s2t/exps/deepspeech2/bin/export.py @@ -41,6 +41,7 @@ def main(config, args): '--nxpu', type=int, default=0, + choices=[0, 1], help="if nxpu == 0 and ngpu == 0, use cpu.") args = parser.parse_args() print("model_type:{}".format(args.model_type)) diff --git a/paddlespeech/s2t/exps/deepspeech2/bin/test.py b/paddlespeech/s2t/exps/deepspeech2/bin/test.py index c91be411a38..a7d99e02a8c 100644 --- a/paddlespeech/s2t/exps/deepspeech2/bin/test.py +++ b/paddlespeech/s2t/exps/deepspeech2/bin/test.py @@ -41,6 +41,7 @@ def main(config, args): '--nxpu', type=int, default=0, + choices=[0, 1], help="if nxpu == 0 and ngpu == 0, use cpu.") args = parser.parse_args() print_arguments(args, globals()) diff --git a/paddlespeech/s2t/exps/deepspeech2/bin/test_export.py b/paddlespeech/s2t/exps/deepspeech2/bin/test_export.py index 923c3db49b2..58815ad634f 100644 --- a/paddlespeech/s2t/exps/deepspeech2/bin/test_export.py +++ b/paddlespeech/s2t/exps/deepspeech2/bin/test_export.py @@ -44,6 +44,7 @@ def main(config, args): '--nxpu', type=int, default=0, + choices=[0, 1], help="if nxpu == 0 and ngpu == 0, use cpu.") parser.add_argument( "--enable-auto-log", action="store_true", help="use auto log") diff --git a/paddlespeech/s2t/exps/deepspeech2/bin/train.py b/paddlespeech/s2t/exps/deepspeech2/bin/train.py index d80cd0cb29b..3906b2fc6ef 100644 --- a/paddlespeech/s2t/exps/deepspeech2/bin/train.py +++ b/paddlespeech/s2t/exps/deepspeech2/bin/train.py @@ -37,6 +37,7 @@ def main(config, args): '--nxpu', type=int, default=0, + choices=[0, 1], help="if nxpu == 0 and ngpu == 0, use cpu.") args = parser.parse_args() print("model_type:{}".format(args.model_type))