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

147 Stars 27 Forks 35 Commits 7 Opened issues


pytorch 2 caffe

Services available


Need anything else?

Contributors list


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 (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
  • python3 example.json pytorchmodel/best.pth.prototxt new.prototxt
  • python3
  • python3

run container

  • docker pull yaphets4desmond/pytorchconverterstable


Curently supported layers

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

Curently supported network


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.