92

GitHub - miaow1988/ShuffleNet_V2_pytorch_caffe: ShuffleNet-V2 for both PyTorch a...

 5 years ago
source link: https://github.com/miaow1988/ShuffleNet_V2_pytorch_caffe
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

ShuffleNet_V2_pytorch_caffe

ShuffleNet-V2 for both PyTorch and Caffe.

This project supports both Pytorch and Caffe. Multiple kinds of model width are supported. Model with should be 0.5, 1.0, 1.5 or 2.0, other model width are not tested.

Usage

PyTorch

Just use shufflenet_v2.py as following.

import shufflenet_v2
num_classes = 1000
model_width = 0.5 
shufflenet_v2.Network(num_classes, model_width)

Caffe

Prototxt files can be generated by shufflenet_v2.py

python shufflenet_v2.py --save_caffe net --num_classes 1000 --model_width 1.0

Converting Model from PyTorch to Caffe.

python shufflenet_v2.py --load_pytorch net.pth --save_caffe net --num_classes 1000 --model_width 1.0

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK