ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

mobilefacenet 的tflite模型先转onnx模型,在转化为ncnn模型,出现尚不支持 TFL_L2_NORMALIZATION错误,怎么解决?

Open LMR2018 opened this issue 2 years ago • 2 comments

mobilefacenet 的tflite模型先转onnx模型,在转化为ncnn模型,出现尚不支持 TFL_L2_NORMALIZATION错误,怎么解决?

LMR2018 avatar Apr 14 '23 03:04 LMR2018

把param文件里的内容替换成对应支持的算子

不过说实话,目前还不支持从TFLite转NCNN,这样搞炸的可能性很高。。。有条件的话建议从Tensorflow那一级出发,通过keras或者MLIR转到NCNN

wzyforgit avatar Apr 15 '23 00:04 wzyforgit

针对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 avatar Aug 05 '24 09:08 nihui