Need help with brocolli?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

inisis
147 Stars 27 Forks 35 Commits 7 Opened issues

Description

pytorch 2 caffe

Services available

!
?

Need anything else?

Contributors list

brocolli

a pytorch to caffe && tensorrt 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 && tensorrt

How to

run local

  • 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 pytorchmodelconverter.py
  • python3 ssdlayer.py example.json pytorchmodel/best.pth.prototxt new.prototxt
  • python3 caffe_test.py
  • python3 pytorch_test.py

run container

  • docker pull yaphets4desmond/pytorchconverterstable

Notice

Curently supported layers

  • Conv
  • PRelu
  • MaxPooling
  • Sigmoid
  • BatchNormalization
  • Relu
  • LeakyRelu
  • Add
  • AvgPool
  • Flatten
  • FullyConnected
  • Dropout
  • Softmax
  • Upsample
  • Permute
  • Concat

Curently supported network

Contact

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.