Browse Source

modify alexnet script shell

tags/v1.1.0
wukesong 5 years ago
parent
commit
af2b0c046c
5 changed files with 14 additions and 14 deletions
  1. +10
    -10
      model_zoo/official/cv/alexnet/README.md
  2. +1
    -1
      model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh
  3. +1
    -1
      model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh
  4. +1
    -1
      model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh
  5. +1
    -1
      model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh

+ 10
- 10
model_zoo/official/cv/alexnet/README.md View File

@@ -110,7 +110,7 @@ Major parameters in train.py and config.py as follows:
- running on Ascend - 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 # or enter script dir, and run the script
sh run_standalone_train_ascend.sh cifar-10-batches-bin ckpt 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: 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: 1, loss is 2.2791853
... ...
epoch: 1 step: 1536, loss is 1.9366643 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 - 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 # or enter script dir, and run the script
sh run_standalone_train_for_gpu.sh cifar-10-batches-bin ckpt 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: 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: 1 step: 1, loss is 2.3125906
... ...
epoch: 30 step: 1560, loss is 0.6687547 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 - 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 # or enter script dir, and run the script
sh run_standalone_eval_ascend.sh cifar-10-verify-bin ckpt/checkpoint_alexnet-1_1562.ckpt 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 'Accuracy': 0.8832
``` ```
- running on GPU - 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 # 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 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 'Accuracy': 0.88512
``` ```


+ 1
- 1
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_ascend.sh View File

@@ -26,4 +26,4 @@ export CKPT_PATH=$3
export DEVICE_ID=$4 export DEVICE_ID=$4


python eval.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH --ckpt_path=$CKPT_PATH \ 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 &

+ 1
- 1
model_zoo/official/cv/alexnet/scripts/run_standalone_eval_gpu.sh View File

@@ -26,4 +26,4 @@ export CKPT_PATH=$3
export DEVICE_ID=$4 export DEVICE_ID=$4


python eval.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH --ckpt_path=$CKPT_PATH \ 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 &

+ 1
- 1
model_zoo/official/cv/alexnet/scripts/run_standalone_train_ascend.sh View File

@@ -25,4 +25,4 @@ export DATA_PATH=$2
export DEVICE_ID=$3 export DEVICE_ID=$3


python train.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH \ 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 &

+ 1
- 1
model_zoo/official/cv/alexnet/scripts/run_standalone_train_gpu.sh View File

@@ -25,4 +25,4 @@ export DATA_PATH=$2
export DEVICE_ID=$3 export DEVICE_ID=$3


python train.py --dataset_name=$DATASET_NAME --data_path=$DATA_PATH \ 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 &

Loading…
Cancel
Save