whisper onnx2ncnn
error log | 日志或报错信息 | ログ
model | 模型 | モデル
- openai/whisper encoder onnx model https://huggingface.co/optimum/whisper-tiny.en/tree/main
how to reproduce | 复现步骤 | 再現方法
onnx2ncnn encoder_model_sim.onnx encoder.param encoder.bin
I see that these are not supported
Shape not supported yet!
Unsupported unsqueeze axes !
Unknown data type 0
I suggest that you use https://github.com/k2-fsa/sherpa-onnx/blob/master/scripts/whisper/export-onnx.py to export the whisper model to onnx.
Or you can directly use pnnx with the above script.
针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn In view of various problems in onnx model conversion, it is recommended to use the latest pnnx tool to convert your model to ncnn
pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224]
详细参考文档 Detailed reference documentation https://github.com/pnnx/pnnx https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx#how-to-use-pnnx
@nihui 老师好,我用pnnx 转了whisper 最后有一层normalize,再用pnnx里面自带的ncnn py,总是这一层年报错[https://github.com/Tencent/ncnn/issues/6220 我只是猜
https://github.com/Tencent/ncnn/pull/6359
The whisper asr example appears. Please follow the model conversion steps starting with cpp, or you can directly use the model from https://github.com/nihui/ncnn-android-whisper/releases/tag/models
https://github.com/Tencent/ncnn/commit/021af96e707f6f16bfb05f028915e42076a91b7d