a pytorch to caffe model converter, it learns from MMdnn && PytorchConverter. MMdnn only provides tools for pytorch to onnx conversion, but our tool provides direct conversion from pytorch to caffe
- git clone https://github.com/inisis/caffe (only for valiation if u don't need verify your results, skip this)
- cd caffe && (revise your dependency to caffe 3) && make pycaffe
- pip3 install torch==0.4.0 torchvision==0.2.0
- export PYTHONPATH=$PYTHONPATH:/your/path/to/brocolli/
- put your pytorch model in tests/pytorch_model folder
- python3 pytorch_model_converter.py
- python3 ssd_layer.py example.json pytorch_model/best.pth.prototxt new.prototxt
- python3 caffe_test.py
- python3 pytorch_test.py
- docker pull yaphets4desmond/pytorch_converter_stable
Curently supported layers
- Conv
- PRelu
- MaxPooling
- Sigmoid
- BatchNormalization
- Relu
- Add
- AvgPool
- Flatten
- FullyConnected
- Dropout
- Softmax
- Upsample
- Permute
- Concat
Curently supported network
- SSD
- ResNet
- Desmond [email protected]
- qq group: 597059928