diff --git a/example/mobilenetv2_quant/scripts/run_train.sh b/example/mobilenetv2_quant/scripts/run_train.sh index 26946ad88b..14f3a8a6b6 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 3013e6ce5b..a427201587 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