mindspore.convert_model
- mindspore.convert_model(mindir_file, convert_file, file_format)[source]
Convert mindir model to other format model. The current version only supports conversion to ONNX models.
Warning
This is an experimental API that is subject to change or deletion.
- Parameters
- Raises
TypeError – If the parameter mindir_file is not str.
TypeError – If the parameter convert_file is not str.
ValueError – If the parameter file_format is not "ONNX".
Examples
>>> import mindspore as ms >>> ms.convert_model("lenet.mindir", "lenet.onnx", "ONNX")