From af2b0c046c1e9969e4725e340f79f375b2e27836 Mon Sep 17 00:00:00 2001 From: wukesong Date: Mon, 19 Oct 2020 17:24:06 +0800 Subject: [PATCH] modify alexnet script shell --- model_zoo/official/cv/alexnet/README.md | 20 +++++++++---------- .../scripts/run_standalone_eval_ascend.sh | 2 +- .../scripts/run_standalone_eval_gpu.sh | 2 +- .../scripts/run_standalone_train_ascend.sh | 2 +- .../scripts/run_standalone_train_gpu.sh | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/model_zoo/official/cv/alexnet/README.md b/model_zoo/official/cv/alexnet/README.md index 62adfa91071..d682836985a 100644 --- a/model_zoo/official/cv/alexnet/README.md +++ b/model_zoo/official/cv/alexnet/README.md @@ -110,7 +110,7 @@ Major parameters in train.py and config.py as follows: - running on Ascend ``` - python train.py --data_path cifar-10-batches-bin --ckpt_path ckpt > log.txt 2>&1 & + python train.py --data_path cifar-10-batches-bin --ckpt_path ckpt > log 2>&1 & # or enter script dir, and run the script sh run_standalone_train_ascend.sh cifar-10-batches-bin ckpt ``` @@ -118,7 +118,7 @@ Major parameters in train.py and config.py as follows: After training, the loss value will be achieved as follows: ``` - # grep "loss is " train.log + # grep "loss is " log epoch: 1 step: 1, loss is 2.2791853 ... epoch: 1 step: 1536, loss is 1.9366643 @@ -132,7 +132,7 @@ Major parameters in train.py and config.py as follows: - running on GPU ``` - python train.py --device_target "GPU" --data_path cifar-10-batches-bin --ckpt_path ckpt > log.txt 2>&1 & + python train.py --device_target "GPU" --data_path cifar-10-batches-bin --ckpt_path ckpt > log 2>&1 & # or enter script dir, and run the script sh run_standalone_train_for_gpu.sh cifar-10-batches-bin ckpt ``` @@ -140,7 +140,7 @@ Major parameters in train.py and config.py as follows: After training, the loss value will be achieved as follows: ``` - # grep "loss is " train.log + # grep "loss is " log epoch: 1 step: 1, loss is 2.3125906 ... epoch: 30 step: 1560, loss is 0.6687547 @@ -158,30 +158,30 @@ Before running the command below, please check the checkpoint path used for eval - running on Ascend ``` - python eval.py --data_path cifar-10-verify-bin --ckpt_path ckpt/checkpoint_alexnet-1_1562.ckpt > log.txt 2>&1 & + python eval.py --data_path cifar-10-verify-bin --ckpt_path ckpt/checkpoint_alexnet-1_1562.ckpt > eval_log.txt 2>&1 & # or enter script dir, and run the script sh run_standalone_eval_ascend.sh cifar-10-verify-bin ckpt/checkpoint_alexnet-1_1562.ckpt ``` - You can view the results through the file "log.txt". The accuracy of the test dataset will be as follows: + You can view the results through the file "eval_log". The accuracy of the test dataset will be as follows: ``` - # grep "Accuracy: " log.txt + # grep "Accuracy: " eval_log 'Accuracy': 0.8832 ``` - running on GPU ``` - python eval.py --device_target "GPU" --data_path cifar-10-verify-bin --ckpt_path ckpt/checkpoint_alexnet-30_1562.ckpt > log.txt 2>&1 & + python eval.py --device_target "GPU" --data_path cifar-10-verify-bin --ckpt_path ckpt/checkpoint_alexnet-30_1562.ckpt > eval_log 2>&1 & # or enter script dir, and run the script sh run_standalone_eval_for_gpu.sh cifar-10-verify-bin ckpt/checkpoint_alexnet-30_1562.ckpt ``` - You can view the results through the file "log.txt". The accuracy of the test dataset will be as follows: + You can view the results through the file "eval_log". The accuracy of the test dataset will be as follows: ``` - # grep "Accuracy: " log.txt + # grep "Accuracy: " eval_log 'Accuracy': 0.88512 ``` diff --git a/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh b/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh index ef022f65ac4..fbccfaf7a7f 100644 --- a/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh +++ b/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh @@ -26,4 +26,4 @@ export CKPT_PATH=$3 export DEVICE_ID=$4 python eval.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH --ckpt_path=$CKPT_PATH \ - --device_id=$DEVICE_ID --device_target="Ascend" > log.txt 2>&1 & + --device_id=$DEVICE_ID --device_target="Ascend" > eval_log 2>&1 & diff --git a/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh b/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh index 4130138e1d5..9af3f61a960 100644 --- a/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh +++ b/model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh @@ -26,4 +26,4 @@ export CKPT_PATH=$3 export DEVICE_ID=$4 python eval.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH --ckpt_path=$CKPT_PATH \ - --device_id=$DEVICE_ID --device_target="GPU" > log.txt 2>&1 & + --device_id=$DEVICE_ID --device_target="GPU" > eval_log 2>&1 & diff --git a/model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh b/model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh index 743b8416e82..49e46879c08 100644 --- a/model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh +++ b/model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh @@ -25,4 +25,4 @@ export DATA_PATH=$2 export DEVICE_ID=$3 python train.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH \ - --device_id=$DEVICE_ID --device_target="Ascend" > log.txt 2>&1 & + --device_id=$DEVICE_ID --device_target="Ascend" > log 2>&1 & diff --git a/model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh b/model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh index b616d5eb8cc..4f9d5813281 100644 --- a/model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh +++ b/model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh @@ -25,4 +25,4 @@ export DATA_PATH=$2 export DEVICE_ID=$3 python train.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH \ - --device_id=$DEVICE_ID --device_target="GPU" > log.txt 2>&1 & + --device_id=$DEVICE_ID --device_target="GPU" > log 2>&1 &