Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
dengjian 39eca9a3e3 | 2 years ago | |
---|---|---|
ascend310_infer | 2 years ago | |
convert | 2 years ago | |
infer | 2 years ago | |
modelarts | 2 years ago | |
scripts | 2 years ago | |
src | 2 years ago | |
README.md | 2 years ago | |
eval.py | 2 years ago | |
export.py | 2 years ago | |
mindspore_hub_conf.py | 2 years ago | |
postprocess.py | 2 years ago | |
preprocess.py | 2 years ago | |
requirements.txt | 2 years ago | |
train.py | 2 years ago |
ShuffleNetV2 is a much faster and more accurate network than the previous networks on different platforms such as Ascend or GPU.
Paper Ma, N., Zhang, X., Zheng, H. T., & Sun, J. (2018). Shufflenet v2: Practical guidelines for efficient cnn architecture design. In Proceedings of the European conference on computer vision (ECCV) (pp. 116-131).
The overall network architecture of ShuffleNetV2 is show below:
Dataset used: imagenet
+-- ShuffleNetV2
+-- Readme.md # descriptions about ShuffleNetV2
+-- scripts
+--run_distribute_train_for_ascebd.sh # shell script for distributed Ascend training
+--run_distribute_train_for_gpu.sh # shell script for distributed GPU training
+--run_eval_for_ascend.sh # shell script for Ascend evaluation
+--run_eval_for_gpu.sh # shell script for GPU evaluation
+--run_standalone_train_for_gpu.sh # shell script for standalone GPU training
+-- src
+--config.py # parameter configuration
+--CrossEntropySmooth.py # loss function for GPU training
+--dataset.py # creating dataset
+--loss.py # loss function for network
+--lr_generator.py # learning rate config
+--shufflenetv2.py # ShuffleNetV2 model network
+-- train.py # training script
+-- eval.py # evaluation script
You can start training using python or shell scripts. The usage of shell scripts as follows:
# training example
python:
GPU: mpirun --allow-run-as-root -n 8 --output-filename log_output --merge-stderr-to-stdout python train.py --is_distributed=True --platform='GPU' --dataset_path='~/imagenet' > train.log 2>&1 &
shell:
GPU: cd scripts & sh run_distribute_train_for_gpu.sh 8 0,1,2,3,4,5,6,7 ~/imagenet
Training result will be stored in the example path. Checkpoints will be stored at ./checkpoint
by default, and training log will be redirected to ./train/train.log
.
You can start evaluation using python or shell scripts. The usage of shell scripts as follows:
# infer example
python:
Ascend: python eval.py --platform='Ascend' --dataset_path='~/imagenet' --checkpoint='checkpoint_file' > eval.log 2>&1 &
GPU: CUDA_VISIBLE_DEVICES=0 python eval.py --platform='GPU' --dataset_path='~/imagenet/val/' --checkpoint='checkpoint_file'> eval.log 2>&1 &
shell:
Ascend: cd scripts & sh run_eval_for_ascend.sh '~/imagenet' 'checkpoint_file'
GPU: cd scripts & sh run_eval_for_gpu.sh '~/imagenet' 'checkpoint_file'
checkpoint can be produced in training process.
Inference result will be stored in the example path, you can find result in eval.log
.
Parameters | Ascend 910 | GPU |
---|---|---|
Model Version | ShuffleNetV2 | ShuffleNetV2 |
Resource | Ascend 910 | NV SMX2 V100-32G |
uploaded Date | 10/09/2021 (month/day/year) | 09/24/2020 (month/day/year) |
MindSpore Version | 1.3.0 | 1.0.0 |
Dataset | ImageNet | ImageNet |
Training Parameters | src/config.py | src/config.py |
Optimizer | Momentum | Momentum |
Loss Function | SoftmaxCrossEntropyWithLogits | CrossEntropySmooth |
Accuracy | 69.59%(TOP1) | 69.4%(TOP1) |
Total time | 11.6 h 8ps | 49 h 8ps |
Parameters | Ascend 910 | GPU |
---|---|---|
Resource | Ascend 910 | NV SMX2 V100-32G |
uploaded Date | 10/09/2021 (month/day/year) | 09/24/2020 (month/day/year) |
MindSpore Version | 1.3.0 | 1.0.0 |
Dataset | ImageNet | ImageNet |
batch_size | 125 | 128 |
outputs | probability | probability |
Accuracy | acc=69.59%(TOP1) | acc=69.4%(TOP1) |
Please check the official homepage.
No Description
Python Shell C++ Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》