diff --git a/examples/librispeech/s1/local/export.sh b/examples/librispeech/s1/local/export.sh index fb0c3cfae..1b19d5720 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 c5e61bff7..240a63b06 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 47645d4b5..a4218aa86 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 fb0c3cfae..1b19d5720 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 c5e61bff7..240a63b06 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 47645d4b5..f8c9dbc0b 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