From 2ad7c4f48c3dcc6e1275b18e08d6d0321165cd2e Mon Sep 17 00:00:00 2001 From: Jeremy Cochoy Date: Sat, 1 Feb 2020 18:15:18 +0200 Subject: [PATCH] Add --minimum_ios_deployment_target to convert-onnx-to-coreml --- onnx_coreml/bin/convert.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/onnx_coreml/bin/convert.py b/onnx_coreml/bin/convert.py index d239aa7c..bebfecd0 100644 --- a/onnx_coreml/bin/convert.py +++ b/onnx_coreml/bin/convert.py @@ -19,10 +19,14 @@ @click.option('-o', '--output', required=True, type=str, help='Output path for the CoreML *.mlmodel file') -def onnx_to_coreml(onnx_model, output): # type: (IO[str], str) -> None +@click.option('-t', '--minimum_ios_deployment_target', required=False, + default='11.2', + type=str, + help='Output path for the CoreML *.mlmodel file') +def onnx_to_coreml(onnx_model, output, **kargs): # type: (IO[str], str) -> None onnx_model_proto = onnx_pb.ModelProto() onnx_model_proto.ParseFromString(onnx_model.read()) - coreml_model = convert(onnx_model_proto) + coreml_model = convert(onnx_model_proto, **kargs) coreml_model.save(output)