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

tensorflow_tts 中的fastspeech2 模型在转为onnx之后再转为mnn出现了 Failed: Loop don't support optional M and cond input #2267

Closed
dshwei opened this issue Mar 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working Converter

Comments

@dshwei
Copy link

dshwei commented Mar 9, 2023

平台(如果交叉编译请再附上交叉编译目标平台):

Platform(Include target platform as well if cross-compiling):

Github版本:

Github Version:

2.4.0

编译方式:

Compiling Method

cmake and make
https://mnn-docs.readthedocs.io/en/latest/compile/tools.html

cmake .. -DMNN_BUILD_CONVERTER=ON -DMNN_BUILD_TORCH=ON

编译日志:

Build Log:

./MNNConvert -f ONNX --modelFile fastspeech2/fastspeech2_onnx_model.onnx --MNNModel fastspeech2_onnx_model.mnn --bizCode biz

2023-03-09 16:43:03.632028609 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer 'zero_const__60'. It is not used by any node and should be removed from the model.
initial inputs value, input type : tensor(int32)
input name input_1 type is int32
initial inputs value, input type : tensor(int32)
input name input_2 type is int32
initial inputs value, input type : tensor(float)
input name input_3 type is float32
initial inputs value, input type : tensor(float)
input name input_4 type is float32
initial inputs value, input type : tensor(float)
input name input_5 type is float32
model graph output name :  ['output_1', 'output_2', 'output_3', 'output_4', 'output_5']
inputs: [{'name': 'input_1', 'shape': [1, 10]}, {'name': 'input_2', 'shape': [1]}, {'name': 'input_3', 'shape': [1]}, {'name': 'input_4', 'shape': [1]}, {'name': 'input_5', 'shape': [1]}]
【input key and value write into file 】
inputs file name :onnx/input_1.txt 
inputs file name :onnx/input_2.txt 
inputs file name :onnx/input_3.txt 
inputs file name :onnx/input_4.txt 
inputs file name :onnx/input_5.txt 
outputs: ['output_1', 'output_2', 'output_3', 'output_4', 'output_5']
output file name :onnx/output_1.txt , output shape (1, 64, 80),output type float32
output file name :onnx/output_2.txt , output shape (1, 64, 80),output type float32
output file name :onnx/output_3.txt , output shape (1, 10),output type int32
output file name :onnx/output_4.txt , output shape (1, 10),output type float32
output file name :onnx/output_5.txt , output shape (1, 10),output type float32
-----------------test TTS_tf2/Fastspeech2/model_dir/fastspeech2/fastspeech2_onnx_model.onnx onnx model done -------------
Segmentation fault (core dumped)
【convert to mnn model result 】: The device support dot:0, support fp16:0, support i8mm: 0
Start to Convert Other Model Format To MNN Model...
[16:43:04] MNN-2.4.0/tools/converter/source/onnx/onnxConverter.cpp:40: ONNX Model ir version: 7
[16:43:04] MNN-2.4.0/tools/converter/source/onnx/onnxConverter.cpp:108: Check it out ==> savable_tf_fast_speech2/length_regulator/while_loop:0 has empty input, the index is 0
Failed: Loop don't support optional M and cond input
Start to Optimize the MNN Net...

@wangzhaode wangzhaode self-assigned this Mar 10, 2023
@wangzhaode wangzhaode added bug Something isn't working Converter labels Mar 10, 2023
@wangzhaode
Copy link
Collaborator

能否提供对应的ONNX模型?

@jxt1234
Copy link
Collaborator

jxt1234 commented Apr 11, 2023

2.4.2 修正

@jxt1234 jxt1234 closed this as completed Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Converter
Projects
None yet
Development

No branches or pull requests

3 participants