A package to convert pytorch model to caffe model
Project description
# pytorch2caffe
A package to convert pytorch model to caffe model.
## Installation
pip3 install pytorch2caffe
or
git clone https://github.com/woodsgao/pytorch2caffe cd pytorch2caffe python3 setup.py install
## Tutorials
Note: import torch first then import pytorch2caffe
import torch from torchvision.models import resnet from pytorch2caffe import pytorch2caffe
name=’resnet18’ resnet18=resnet.resnet18() resnet18.eval() dummy_input=torch.ones([1,3,224,224]) pytorch2caffe.trans_net(resnet18, dummy_input, name) pytorch2caffe.save_prototxt(‘{}.prototxt’.format(name)) pytorch2caffe.save_caffemodel(‘{}.caffemodel’.format(name))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytorch2caffe-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 695bf5a2f2097b3bf8cc1540f4641dd2ad5abaea0be781967d6ed3a1b33ee443 |
|
MD5 | fe1318e929a027a7dfdc2fdce0409480 |
|
BLAKE2b-256 | 69c297605a8e0aa949bd6616a4bff702204b85d9da176bd62f6cea9fae49ecea |