export ONNX format issue for CPU
ENV: onnx = 1.10.0, torch=1.11.0 when i export onnx format of encoder by setting chunk_size -1, the output node is as follows: output [Addoutput_dim_0, T, 256] r_att_cache [12,4,T_CACHE,128] r_cnn_cache [12,1,256,Concatr_cnn_cache_dim_3] the dimension name "Addoutput_dim_0" and "Concatr_cnn_cache_dim_3" should be fixed to 1 and 7?
another is decoder onnx, the output is as follows: score [LogSoftmaxscore_dim_0,L,4233] r_score there is any mistake for these two output node's dimension.
@xingchensong @lzhin please follow the issue.
I cannot reproduce this issue, please provide more info. Are u using u2pp_conformer or just standard conformer? whats your num_left_chunks? please show us all of your hyperparameters.
@xingchensong Yes, i use u2++_conformer model, and my export script is as below:
python wenet/bin/export_onnx_cpu.py --config exp/u2++_conformer/train.yaml --checkpoint exp/u2++_conformer/final.pt --chunk_size -1 --beam 15 --num_decoding_left_chunks -1 --output_dir ./onnx/
my OS is centos7

I think this doesn't affect the decoding result, since Addoutput_dim_0 and Concat_cnn_cache_dim_3 can be inferred during runtime.
I will try it for inference, and this may be a issue for onnx export, i think nbest need be set to a fixed value when exporting.
Have you solved the problem? I cannot feed the r_cnn_cache with an uncertain dimension to the encoder.
Discussed it offline, close this issue