问题描述:
【操作步骤&问题现象】
使用mindspore1.6将ckpt文件转为onnx时报错,提示“Can not find key Conv2DTranspose in convert map.Exporting Conv2DTranspose operator is not yet supported.”
【日志信息】(可选,上传日志内容或者附件)
Traceback (most recent call last):
File "F:/mind_spore/UNet_Plus_Plus_for_MindSpore_1.1_code/export.py", line 59, in
run_export()
File "F:\mind_spore\UNet_Plus_Plus_for_MindSpore_1.1_code\src\model_utils\moxing_adapter.py", line 104, in wrapped_func
run_func(*args, **kwargs)
File "F:/mind_spore/UNet_Plus_Plus_for_MindSpore_1.1_code/export.py", line 56, in run_export
export(net, input_data, file_name=config.file_name, file_format=config.file_format)
File "D:\software\anaconda\envs\mind_spore\lib\site-packages\mindspore\train\serialization.py", line 813, in export
_export(net, file_name, file_format, *inputs, **kwargs)
File "D:\software\anaconda\envs\mind_spore\lib\site-packages\mindspore\train\serialization.py", line 854, in _export
onnx_stream = _executor._get_func_graph_proto(net, graph_id)
File "D:\software\anaconda\envs\mind_spore\lib\site-packages\mindspore\common\api.py", line 747, in _get_func_graph_proto
return self._graph_executor.get_func_graph_proto(exec_id, ir_type)
RuntimeError: mindspore\ccsrc\transform\express_ir\onnx_exporter.cc:1657 ExportPrimitive] Can not find key Conv2DTranspose in convert map. Exporting Conv2DTranspose operator is not yet supported.
WARNING: Logging before InitGoogleLogging() is written to STDERR
[CRITICAL] EXPRESS(24032,1,?):2022-3-8 17:38:3 [mindspore\ccsrc\transform\express_ir\onnx_exporter.cc:1657] ExportPrimitive] Can not find key Conv2DTranspose in convert map. Exporting Conv2DTranspose operator is not yet supported.
解答:
mindspore1.7转onnx格式,Conv2DTranspose已经支持,目前可以在gitee下载源码。mindspore: MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
通过编译安装方式安装mindspore1.7:
使用源码编译方式,在不同的环境安装MindSpore,可参考以下文档: