Open JiahangXu opened 2 years ago
@nihui 求大佬回复~
pytorch版本太旧了.
halo,这个问题你解决了么?
halo,这个问题你解决了么?
Pytorch新版本没有问题啊
您好,也就是说torch2.0转的模型,在onnx和pnnx工具上都能转NCNN了? 刚用的是1.13,我去试试torch2.0
针对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
error log | 日志或报错信息 | ログ
我使用的python代码如下:
然后使用https://github.com/pnnx/pnnx/releases 下载的windows版pnnx进行convert,command为
然后报错:
context | 编译/运行环境 | バックグラウンド
torch-1.12.1, torchvision-0.13.1, windows 11