torch2coreml icon indicating copy to clipboard operation
torch2coreml copied to clipboard

Is it possible to convert the re-trained pytorch model (xx.pth) using the "inception v3" model?

Open um0619 opened this issue 7 years ago • 3 comments

Is it possible to convert the re-trained pytorch model (xx.pth) using the "inception v3" model?

um0619 avatar Nov 15 '17 06:11 um0619

This tool is aimed for torch7 (Lua) models. It is not compatible with pytorch. You could try to convert your model to CoreML using intermediate ONNX format (it is in early development state): https://github.com/onnx/onnx-coreml http://pytorch.org/docs/master/onnx.html

opedge avatar Nov 15 '17 15:11 opedge

@opedge Thank you. Your answer was very helpful. Does the pytorch model need to be converted to ONNX format and converted?

um0619 avatar Nov 16 '17 00:11 um0619

@um0619 You can try to export pytorch model to onnx format and then convert it using onnx-coreml converter (please use the code from master branch directly as it changes very often).

opedge avatar Nov 17 '17 00:11 opedge