forked from marvis/pytorch-caffe, and details of usage on https://github.com/marvis/pytorch-caffe, This repository does some modifications on supported layers.
This tool aims to load caffe prototxt and weights directly in pytorch without explicitly converting model from caffe to pytorch.
use the model and weight directly in pytorch, and save the model as.pth file
Download caffemodel of resnet50, unzip it to model. Then
python caffe_pytorch.py
We modify the convolution and deconvolution layer, so their kernel size can be int of kernel_size or tuple of(kernel_h, kernel_w) Each layer in caffe will have a corresponding layer in pytorch.
- Convolution
- InnerProduct
- BatchNorm
- Scale
- ReLU
- Pooling
- Reshape
- Softmax
- Accuracy
- SoftmaxWithLoss
- Dropout
- Eltwise
- Normalize
- Permute
- Flatten
- Slice
- Concat
- PriorBox
- LRN : gpu version is ok, cpu version produce big difference
- DetectionOutput: support batchsize=1, num_classes=1 forward
- Crop
- Deconvolution
- MultiBoxLoss