Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch loadcaffe

An unofficial library for PyTorch to load caffe model.

NOTE: The project is currently work-in-process, so there may be many bugs. Use it at your own risk. Issues and Pull Requests are welcomed.

Requirements

  • PyTorch
  • python-protobuf

Build Requirements

  • protobuf

Installation

git clone https://github.com/zsrkmyn/pytorch_loadcaffe
cd pytorch_loadcaffe
sudo python setup.py install

Usage

>>> import loadcaffe
>>> net = loadcaffe.load('some.caffemodel')

Troubleshooting

The load process is too slow

A potential reason is that your python-protobuf isn't built with --cpp_implementation options, which may use pure python code to parse protobuf and cause really bad performance. See here for more information.

NotImplementedError occurs

The project currently supports the following caffe layers:

  • Convolution (2D only)
  • Pooling (2D only)
  • ReLU
  • Sigmoid
  • Tanh
  • InnerProduct
  • Dropout
  • SoftmaxWithLoss
  • Softmax

Pull requests are welcomed :-)

About

An unofficial library for PyTorch to load caffe model.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages