tutorials
tutorials copied to clipboard
Segmentation fault: 11 when running onnx_to_coreml.py
Hi, I am trying ONNXLive Tutorial. When I try to convert the ONNX models to CoreML models by running onnx_to_coreml.py script, I get a segmentation fault : 11 error.
Environment I used : macOS high sierra + pyhon 2.7
I also tried anaconda python 3.6 but still same error.
Following is the script I am trying to run :
import sys
from onnx import onnx_pb
from onnx_coreml import convert
model_in = sys.argv[1]
model_out = sys.argv[2]
model_file = open(model_in, 'rb')
model_proto = onnx_pb.ModelProto()
model_proto.ParseFromString(model_file.read())
coreml_model = convert(model_proto, image_input_names=['0'], image_output_names=['186'])
coreml_model.save(model_out)
Please suggest me a solution. Thank you so much in advance.
@smessmer could you take a look?
I have the same issue.
I have the same issue.
I have the same issue.
I've had the same issue. I was able to fix this by compiling ONNX from source.
@Hugstar Thank you. I complied ONNX from the source but still the same error. I think the error comes from the convert function.
Getting the same issue
Has anyone converted a pytorch model to CoreML successfully? Getting the same Segmentation fault: 11 error. Anyone know how to make this work? @drogen120 @Hugstar @AnkitPurohit01
Like mentioned in #365 from onnx/onnx-coreml, I am also still having the issue of a segfault. I was not able to convert any onnx model to a mlmodel.
@Seanbakko Yes - what fixed it for me was compiling both Pytorch and ONNX from source and it solved the issue completely.
@Seanbakko Yes - what fixed it for me was compiling both Pytorch and ONNX from source and it solved the issue completely.
couldn't solve my problem. getting "Segmentation fault: 11" when trying to convert to coreml.. so annoying.