Open ciwei123 opened 3 years ago
针对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 Thanks for your sharing. I want to convert https://github.com/photosynthesis-team/piq/blob/master/piq/brisque.py to ncnn ,and I get some errors: 1.ONNX export failed on ATen operator group_norm because torch.onnx.symbolic.roll does not exist 2.ONNX export failed on ATen operator group_norm because torch.onnx.symbolic.lgamma does not exist To solve these errors, I add two functions to
symbolic_opset9.py
:And then I get another error:
RuntimeError: ONNX export failed: Couldn't export operator aten::sum
Could you help me? Thank you very much!