Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
liutension 07fc5a9bb5 | 3 years ago | |
---|---|---|
.. | ||
codec | 3 years ago | |
prune | 3 years ago | |
quantization | 3 years ago | |
README.md | 3 years ago | |
main.py | 3 years ago | |
utils.py | 3 years ago |
This is the baseline of deep neural networks compression, including prune, quantization and encoding.
--model
: Name of the model (eg. alexnet, vgg16)--quant_method
: method of quantization--bits
: quantization bit width--overflow_rate
: overflow rate--codec
: encode or decode--coded
: encode/decode file--prune_method
: method of prune--rate
: prune rate--epochs
: retrain epochs--lr
: learning rate--lr_adjust
: epochs of adjusting learning rate--layer_begin
: the beginning layer for prune--layer_inter
: internal of two prune (vgg:2; resnet50:3; inception_v3:3)--layer_end
: the end layer for prune (vgg:28; resnet50:156; inception_v3:287)--skip_downsample
: skip downsample layer--save_dir
: save path to pruned model--eval
: test path for pruned model--batch_size
: batch size--gpu
: gpu ID--train_data_root
: dataset for train--test_data_root
: dataset for test--print-freq
: print frequencypython main.py --model vgg16 --quant_method linear --codec encode --model_save ./vgg16.torch -coded ./vgg16_coded.pkl --batch_size 16 --bits 8
python main.py --model vgg16 --codec decode --gpu 1 --model_save ./vgg16_de.torch --coded vgg16_coded.pkl
python main.py --model vgg16 --prune_method norm2 --rate 0.7 --epochs 12 --lr 0.001 --lr_adjust 3 --layer_begin 0 --layer_end 28 --layer_inter 2 --skip_downsample 1 --save_dir ${dir to vgg16.torch} --batch_size 64 --gpu 1,2 --train_data_root ${dir to train dataset} --test_data_root ${dir to test dataset} --print-freq 400
python main.py --model vgg16 --eval ${dir to best.vgg16.torch} --gpu 1,2
network | bit-width | top1-accuracy | top5-accuracy | model size |
---|---|---|---|---|
VGG16 | 8 | 0.7157 | 0.9038 | 90.18MB |
ResNet18 | 8 | 0.6943 | 0.8891 | 6.26MB |
ResNet50 | 8 | 0.7573 | 0.9269 | 13.38MB |
Inception-v3 | 8 | 0.7645 | 0.9301 | 15.43MB |
network | prune | top1-accuracy | top5-accuracy |
---|---|---|---|
VGG16 | 0.7 | 0.6765 | 0.8821 |
ResNet50 | 0.7 | 0.7362 | 0.9177 |
Inception-v3 | 0.7 | 0.7330 | 0.9183 |
@Deprecated 此仓库已弃用,请移步至 https://git.openi.org.cn/OpenI/octopus.
启智章鱼项目(OPENI-OCTOPUS)是一个集群管理和资源调度系统,支持在GPU集群中运行AI任务作业(比如深度学习任务作业)。平台提供了一系列接口,能够支持主流的深度学习框架。
JavaScript Go SVG Python JSX other
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》