mindspore.convert_model ======================= .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/mindspore/mindspore.convert_model.rst :alt: 查看源文件 .. py:function:: mindspore.convert_model(mindir_file, convert_file, file_format) 将MindIR模型转化为其他格式的模型文件。当前版本仅支持转化成ONNX模型。 .. warning:: 这是一个实验性API,后续可能修改或删除。 参数: - **mindir_file** (str) - MindIR模型文件名称。 - **convert_file** (str) - 转化后的模型文件名称。 - **file_format** (str) - 需要转化的文件格式,当前版本仅支持"ONNX"。 异常: - **TypeError** - `mindir_file` 参数不是str类型。 - **TypeError** - `convert_file` 参数不是str类型。 - **ValueError** - `file_format` 参数的值不是"ONNX"。