From 4e94debf6990feb7dd7f03193229b1560f7fa1d3 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Fri, 30 Apr 2021 07:32:26 +0000 Subject: [PATCH] fix bugs --- examples/librispeech/s1/local/export.sh | 2 +- examples/librispeech/s1/local/test.sh | 2 +- examples/librispeech/s1/local/train.sh | 3 ++- examples/tiny/s1/local/export.sh | 2 +- examples/tiny/s1/local/test.sh | 2 +- examples/tiny/s1/local/train.sh | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/librispeech/s1/local/export.sh b/examples/librispeech/s1/local/export.sh index fb0c3cfa..1b19d572 100755 --- a/examples/librispeech/s1/local/export.sh +++ b/examples/librispeech/s1/local/export.sh @@ -13,7 +13,7 @@ ckpt_path_prefix=$2 jit_model_export_path=$3 device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi diff --git a/examples/librispeech/s1/local/test.sh b/examples/librispeech/s1/local/test.sh index c5e61bff..240a63b0 100755 --- a/examples/librispeech/s1/local/test.sh +++ b/examples/librispeech/s1/local/test.sh @@ -9,7 +9,7 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') echo "using $ngpu gpus..." device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi config_path=$1 diff --git a/examples/librispeech/s1/local/train.sh b/examples/librispeech/s1/local/train.sh index 47645d4b..a4218aa8 100755 --- a/examples/librispeech/s1/local/train.sh +++ b/examples/librispeech/s1/local/train.sh @@ -12,9 +12,10 @@ config_path=$1 ckpt_name=$2 device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi +echo "using ${device}..." mkdir -p exp diff --git a/examples/tiny/s1/local/export.sh b/examples/tiny/s1/local/export.sh index fb0c3cfa..1b19d572 100755 --- a/examples/tiny/s1/local/export.sh +++ b/examples/tiny/s1/local/export.sh @@ -13,7 +13,7 @@ ckpt_path_prefix=$2 jit_model_export_path=$3 device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi diff --git a/examples/tiny/s1/local/test.sh b/examples/tiny/s1/local/test.sh index c5e61bff..240a63b0 100755 --- a/examples/tiny/s1/local/test.sh +++ b/examples/tiny/s1/local/test.sh @@ -9,7 +9,7 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') echo "using $ngpu gpus..." device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi config_path=$1 diff --git a/examples/tiny/s1/local/train.sh b/examples/tiny/s1/local/train.sh index 47645d4b..f8c9dbc0 100755 --- a/examples/tiny/s1/local/train.sh +++ b/examples/tiny/s1/local/train.sh @@ -12,7 +12,7 @@ config_path=$1 ckpt_name=$2 device=gpu -if [ ngpu != 0 ];then +if [ ngpu == 0 ];then device=cpu fi -- GitLab