k2-fsa/sherpa-ncnn

修复最新ncnn推理错误的问题

Opened this issue · 0 comments

nihui commented

关联 Tencent/ncnn#4878

zipformer-encoder 末尾这里
红框这个 BinaryOp 的输入,一边是 3 维 w=160 h=2 c=8,一边是 1 维 w=160,这不适用于 ncnn 的 implicit broadcast https://github.com/Tencent/ncnn/wiki/binaryop-broadcasting

需要修改 MemoryData 为 3 维,修改后新旧ncnn都可以兼容

MemoryData               downsample_output        0 1 2026 0=160

修改为

MemoryData               downsample_output        0 1 2026 0=160 1=1 2=1

图片