项目
在 GitHub 查看
inisis/brocolli
关于
Everything in Torch Fx
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文brocolli (Deprecated, this repo is no longer maintained)
torch fx based pytorch model converter, including pytorch2caffe, pytorch2onnx.
torch fx based pytorch model quantizier.
Installation
pip install brocolli
How to use
torch2caffe
- caffe installation
pip install brocolli-caffeimport torchvision.models as models from brocolli.converter.pytorch_caffe_parser import PytorchCaffeParser net = models.alexnet(pretrained=False) x = torch.rand(1, 3, 224, 224) pytorch_parser = PytorchCaffeParser(net, x) pytorch_parser.convert() pytorch_parser.save('alexnet')run this script until you see "accuracy test passed" on screen, then you can get alexnet.caffemodel and alexnet.prototxt under under current folder.
torch2onnx
import torchvision.models as models from brocolli.converter.pytorch_onnx_parser import PytorchOnnxParser net = models.alexnet(pretrained=False) x = torch.rand(1, 3, 224, 224) pytorch_parser = PytorchOnnxParser(net, x) pytorch_parser.convert() pytorch_parser.save('alexnet.onnx')run this script until you see "accuracy test passed" on screen, then you can get alexnet.onnx under current folder.
Contact
QQ Group: 597059928

Show your support
Give a 🌟 if this project helpes~
探索相关项目
加载中…