Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何自助解决不支持的算子 #471

Closed
SWHL opened this issue Jan 5, 2022 · 2 comments
Closed

如何自助解决不支持的算子 #471

SWHL opened this issue Jan 5, 2022 · 2 comments

Comments

@SWHL
Copy link

SWHL commented Jan 5, 2022

问题描述

  • 我正在尝试转换Paddle2Speech中的TTS2模型到ONNX格式,其中转换speedyspeech_csmsc.pdmodel时,遇到有3个op不支持
    Traceback (most recent call last):
      File "/data/home/xxx/.conda/envs/xxx/bin/paddle2onnx", line 8, in <module>
        sys.exit(main())
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/command.py", line 184, in main
        input_shape_dict=input_shape_dict)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/command.py", line 148, in program2onnx
        operator_export_type=operator_export_type)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/convert.py", line 84, in program2onnx
        enable_onnx_checker, operator_export_type)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/convert.py", line 34, in export_onnx
        operator_export_type, verbose)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/graph/onnx_graph.py", line 240, in build
        onnx_graph = ONNXGraph(paddle_graph, opset_version=opset_version, operator_export_type=operator_export_type)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/graph/onnx_graph.py", line 79, in __init__
        self.update_opset_version()
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/graph/onnx_graph.py", line 194, in update_opset_version
        self.opset_version = OpMapper.get_recommend_opset_version(node_map, self.opset_version)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 129, in get_recommend_opset_version
        node_map, opset_version, True)
      File "/data/home/xxx/.conda/envs/xxx/lib/python3.7/site-packages/paddle2onnx/op_mapper/op_mapper.py", line 174, in check_support_status
        raise NotImplementedError(error_info)
    NotImplementedError: 
    There's 3 ops are not supported yet
    =========== while ===========
    =========== conditional_block ===========
    =========== set_value ===========
    
  • 同时,我看到了Paddle2ONNX开发指南这篇文章,尝试按照里面所说的方案,以conditional_block查找对应的Paddle OP。
  • 无奈暂时没有找到对应哪个Paddle OP,或者说这是Paddle搭建模型中,哪个操作引起的?不知是否可以以conditional_block为例,讲解一下如何自助修复不支持的OP

更多信息 :

  • 用于部署的推理引擎: ONNXRuntime
  • 为什么需要转换为ONNX格式: 便于与其他ONNX模型一起整合
  • Paddle2ONNX版本: 0.9.0
  • 你的联系方式(Email/Wechat/Phone): [email protected]

其他信息:

  • 问卷调查已经填过了
@yeliang2258
Copy link
Collaborator

yeliang2258 commented Jan 5, 2022

用户你好,Paddle2ONNX目前尚不支持含有控制流的模型进行转换。部署的话,可以尝试使用PaddleInference或者PaddleLite进行部署。

@yt605155624
Copy link

yt605155624 commented Apr 8, 2022

你好,PaddleSpeech 基于 paddle2onnx 0.9.4 跑通了 fastspeech2 + hifigan/mb_melgan 的 onnxruntime-cpu/gpu 推理,speedyspeech 的 paddle2onnx 暂时还有问题,欢迎关注 PaddlePaddle/PaddleSpeech#1665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants