diff --git a/examples/librispeech/s1/local/export.sh b/examples/librispeech/s1/local/export.sh index fb0c3cfae305e7a065698005e8918506aec2c9bb..1b19d5720b731bed8006d1faed03176dd4ba0c56 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 c5e61bff70d04e18ae1fcc1cab7708b6f3c7af51..240a63b06afab0b24ba3c1ff5421d1034c8fe1de 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 47645d4b5ca0e53e6fbce8ddb14cf577215a6399..a4218aa861431c048256f22661b232a67a04f479 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 fb0c3cfae305e7a065698005e8918506aec2c9bb..1b19d5720b731bed8006d1faed03176dd4ba0c56 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 c5e61bff70d04e18ae1fcc1cab7708b6f3c7af51..240a63b06afab0b24ba3c1ff5421d1034c8fe1de 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 47645d4b5ca0e53e6fbce8ddb14cf577215a6399..f8c9dbc0b5a708457294c6460b6d33ba27f6e9b9 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