k2-fsa/icefall

ONNX decode error

AlexandderGorodetski opened this issue · 2 comments

Hello guys,

I got following ONNX decoding error. Any help is appreciated.

(base) root@gpu-alex-0-0:/workspace/inputs/alexg/asr/src/models/k2_2024/icefall/egs/tedlium3/ASR# sh/main_decode_onnx.sh
2024-05-20 18:18:29,951 INFO [onnx_pretrained.py:358] {'encoder_model_filename': 'zipformer/exp/encoder-epoch-50-avg-1.onnx', 'decoder_model_filename': 'zipformer/exp/decoder-epoch-50-avg-1.onnx', 'joiner_model_filename': 'zipformer/exp/joiner-epoch-50-avg-1.onnx', 'tokens': 'data/lang_bpe_500/tokens.txt', 'sound_files': ['/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_1.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_2.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_3.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_4.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_5.wav'], 'sample_rate': 16000}
2024-05-20 17:18:30.446747687 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446788935 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446797621 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446805386 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446813572 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446820475 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '927'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446830454 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446836926 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446844140 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.446850893 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447037396 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447052075 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447064428 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447075739 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447090187 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '2181'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447103572 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447119091 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447132267 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447146323 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447159568 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447375217 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447389835 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447403622 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447417658 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447432005 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447445691 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447459497 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447477522 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '3485'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447494724 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447508049 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447718048 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447732786 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447746662 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447761170 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447774976 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447789714 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447802358 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447819751 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '5253'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447833918 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.447849998 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448076518 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448091286 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448105894 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448125221 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448138817 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448154155 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '7465'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448165086 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448178241 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448190865 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448204621 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448421262 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448433215 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448443885 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448454505 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448468522 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448480385 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448490894 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448507566 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448518447 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 17:18:30.448529448 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '9211'. It is not used by any node and should be removed from the model.
2024-05-20 18:18:32,488 INFO [onnx_pretrained.py:168] context_size: 2
2024-05-20 18:18:32,489 INFO [onnx_pretrained.py:169] vocab_size: 500
2024-05-20 18:18:32,492 INFO [onnx_pretrained.py:181] joiner_dim: 512
2024-05-20 18:18:32,492 INFO [onnx_pretrained.py:365] Constructing Fbank computer
2024-05-20 18:18:32,493 INFO [onnx_pretrained.py:376] Reading sound files: ['/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_1.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_2.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_3.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_4.wav', '/workspace/inputs/alexg/asr/src/projects/en_eval/input/test_5.wav']
2024-05-20 18:18:32,517 INFO [onnx_pretrained.py:382] Decoding started
2024-05-20 17:18:33.708367788 [E:onnxruntime:, sequential_executor.cc:339 Execute] Non-zero status code returned while running ScatterND node. Name:'/encoder/0/encoder_pos/ScatterND_2' Status Message: invalid indice found, indice = -1
2024-05-20 17:18:33.708455254 [E:onnxruntime:, sequential_executor.cc:339 Execute] Non-zero status code returned while running If node. Name:'/encoder/0/encoder_pos/If' Status Message: Non-zero status code returned while running ScatterND node. Name:'/encoder/0/encoder_pos/ScatterND_2' Status Message: invalid indice found, indice = -1
Traceback (most recent call last):
File "./zipformer/onnx_pretrained.py", line 422, in
main()
File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "./zipformer/onnx_pretrained.py", line 393, in main
encoder_out, encoder_out_lens = model.run_encoder(features, feature_lengths)
File "./zipformer/onnx_pretrained.py", line 199, in run_encoder
out = self.encoder.run(
File "/opt/conda/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 188, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running If node. Name:'/encoder/0/encoder_pos/If' Status Message: Non-zero status code returned while running ScatterND node. Name:'/encoder/0/encoder_pos/ScatterND_2' Status Message: invalid indice found, indice = -1
(base) root@gpu-alex-0-0:/workspace/inputs/alexg/asr/src/models/k2_2024/icefall/egs/tedlium3/ASR#

I performed ONNX check procedure. It seems that it is OK. Please that output of ONNX check below.

(base) root@gpu-alex-0-0:/workspace/inputs/alexg/asr/src/models/k2_2024/icefall/egs/tedlium3/ASR# sh/main_onnx_check.sh
stage 2
2024-05-20 19:36:12,134 INFO [onnx_check.py:201] {'jit_filename': 'zipformer/exp/jit_script.pt', 'onnx_encoder_filename': 'zipformer/exp/encoder-epoch-50-avg-1.onnx', 'onnx_decoder_filename': 'zipformer/exp/decoder-epoch-50-avg-1.onnx', 'onnx_joiner_filename': 'zipformer/exp/joiner-epoch-50-avg-1.onnx'}
2024-05-20 18:36:13.453391447 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453442414 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453451091 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453459306 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453467442 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453475507 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '927'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453482620 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453488101 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453494102 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453500725 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453644267 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453651361 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453660819 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453667391 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453674895 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '2181'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453682550 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453691808 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453698701 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453706966 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453713559 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453827274 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453834799 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453841492 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453848164 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453855137 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453861900 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453868803 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453877590 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '3485'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453887208 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.453894442 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454000173 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454007797 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454014870 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454021794 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454028827 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454036602 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454043094 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454051670 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '5253'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454059174 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454067721 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454173111 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454180384 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454187568 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454196926 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454203749 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454211023 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '7465'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454217365 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454225570 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454232053 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454239026 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454330389 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454337062 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454343554 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454349505 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454356258 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454362490 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454367910 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454375495 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454381356 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-05-20 18:36:13.454387718 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '9211'. It is not used by any node and should be removed from the model.
2024-05-20 19:36:15,327 INFO [onnx_pretrained.py:168] context_size: 2
2024-05-20 19:36:15,327 INFO [onnx_pretrained.py:169] vocab_size: 500
2024-05-20 19:36:15,331 INFO [onnx_pretrained.py:181] joiner_dim: 512
2024-05-20 19:36:15,331 INFO [onnx_check.py:211] Test encoder
2024-05-20 19:36:15,332 INFO [onnx_check.py:132] test_encoder: iter 0, N=9, T=32
2024-05-20 19:36:16,229 INFO [onnx_check.py:132] test_encoder: iter 1, N=16, T=47
2024-05-20 19:36:17,357 INFO [onnx_check.py:132] test_encoder: iter 2, N=13, T=40
2024-05-20 19:36:18,157 INFO [onnx_check.py:214] Test decoder
2024-05-20 19:36:18,157 INFO [onnx_check.py:156] test_decoder: iter 0, N=12
2024-05-20 19:36:18,164 INFO [onnx_check.py:156] test_decoder: iter 1, N=62
2024-05-20 19:36:18,171 INFO [onnx_check.py:156] test_decoder: iter 2, N=75
2024-05-20 19:36:18,180 INFO [onnx_check.py:156] test_decoder: iter 3, N=82
2024-05-20 19:36:18,189 INFO [onnx_check.py:156] test_decoder: iter 4, N=56
2024-05-20 19:36:18,195 INFO [onnx_check.py:156] test_decoder: iter 5, N=52
2024-05-20 19:36:18,201 INFO [onnx_check.py:156] test_decoder: iter 6, N=39
2024-05-20 19:36:18,205 INFO [onnx_check.py:156] test_decoder: iter 7, N=26
2024-05-20 19:36:18,209 INFO [onnx_check.py:156] test_decoder: iter 8, N=80
2024-05-20 19:36:18,217 INFO [onnx_check.py:156] test_decoder: iter 9, N=19
2024-05-20 19:36:18,220 INFO [onnx_check.py:217] Test joiner
2024-05-20 19:36:18,220 INFO [onnx_check.py:181] test_joiner: iter 0, N=66
2024-05-20 19:36:18,232 INFO [onnx_check.py:181] test_joiner: iter 1, N=29
2024-05-20 19:36:18,237 INFO [onnx_check.py:181] test_joiner: iter 2, N=89
2024-05-20 19:36:18,253 INFO [onnx_check.py:181] test_joiner: iter 3, N=17
2024-05-20 19:36:18,256 INFO [onnx_check.py:181] test_joiner: iter 4, N=86
2024-05-20 19:36:18,268 INFO [onnx_check.py:181] test_joiner: iter 5, N=62
2024-05-20 19:36:18,278 INFO [onnx_check.py:181] test_joiner: iter 6, N=82
2024-05-20 19:36:18,290 INFO [onnx_check.py:181] test_joiner: iter 7, N=42
2024-05-20 19:36:18,296 INFO [onnx_check.py:181] test_joiner: iter 8, N=92
2024-05-20 19:36:18,309 INFO [onnx_check.py:181] test_joiner: iter 9, N=88
2024-05-20 19:36:18,321 INFO [onnx_check.py:219] Finished checking ONNX models

The solution is to work with wav duration less than 20 sec.