Skip to main content

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


git clone cd pytorch2caffe python3 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytorch2caffe, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pytorch2caffe-0.1.0-py2.py3-none-any.whl (35.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pytorch2caffe-0.1.0.tar.gz (34.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page