Home

Awesome

Convert torch to pytorch

Convert torch t7 model to pytorch model and source.

Convert

python convert_torch.py -m vgg16.t7

Two file will be created vgg16.py vgg16.pth

Example

import vgg16

model = vgg16.vgg16
model.load_state_dict(torch.load('vgg16.pth'))
model.eval()
...

Validated

All the models in this table can be converted and the results have been validated.

NetworkDownload
AlexNetcnn-benchmarks
Inception-V1cnn-benchmarks
VGG-16cnn-benchmarks
VGG-19cnn-benchmarks
ResNet-18cnn-benchmarks
ResNet-200cnn-benchmarks
ResNeXt-50 (32x4d)ResNeXt
ResNeXt-101 (32x4d)ResNeXt
ResNeXt-101 (64x4d)ResNeXt
DenseNet-264 (k=32)DenseNet
DenseNet-264 (k=48)DenseNet