diff --git a/example/mobilenetv2_quant/scripts/run_train.sh b/example/mobilenetv2_quant/scripts/run_train.sh index 26946ad88bd5b5d84119bac8a44503acf2cc24ea..14f3a8a6b6ea0c99034fd711be13acd3bef6c2d9 100644 --- a/example/mobilenetv2_quant/scripts/run_train.sh +++ b/example/mobilenetv2_quant/scripts/run_train.sh @@ -22,9 +22,9 @@ run_ascend() exit 1 fi - if [ ! -d $5 ] + if [ ! -d $5 ] && [ ! -f $5 ] then - echo "error: DATASET_PATH=$5 is not a directory" + echo "error: DATASET_PATH=$5 is not a directory or file" exit 1 fi diff --git a/example/resnet50_quant/scripts/run_train.sh b/example/resnet50_quant/scripts/run_train.sh index 3013e6ce5b9b58d5c0fdd6efb17a7207ee87d1de..a42720158790c510a2d3ef8a82675917a9e7b9cf 100644 --- a/example/resnet50_quant/scripts/run_train.sh +++ b/example/resnet50_quant/scripts/run_train.sh @@ -22,9 +22,9 @@ run_ascend() exit 1 fi - if [ ! -d $5 ] + if [ ! -d $5 ] && [ ! -f $5 ] then - echo "error: DATASET_PATH=$5 is not a directory" + echo "error: DATASET_PATH=$5 is not a directory or file" exit 1 fi