Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions onnx_coreml/bin/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down