icefall
icefall copied to clipboard
How to delete the Range operator node in ONNX export
Description:
We noticed that in the process of exporting the PyTorch model to the ONNX format, the generated ONNX model contains a Range operator. The locations of these nodes are basically like /encoder//encoder//self _ attn _ weights/Range. What part of the code may cause this problem, and how can I modify it to prevent the range operator from appearing in the exported onnx model? The model export code used is: icefall/egs/librispeech/ASR/zipformer/export-onnx.py We would appreciate any insights or suggestions on this matter.