-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pnnx能正常转换模型,模型输出与onnx模型输出不一致 #5451
Comments
net = torch.jit.load('readout_query.pt')
net.eval()
torch.manual_seed(0)
v_0 = torch.rand(1, 64, 24, 24, dtype=torch.float)
v_1 = torch.rand(1, 1, 16, 65, dtype=torch.float)
return net(v_0, v_1) 你提供的模型,这样随机输入,输出也是 nan |
@nihui 验证了 torch.manual_seed(0) 的时候输出就会是nan 把随机种子改成别的就不会输出nan |
readout_query.tar.gz |
针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224] 详细参考文档 |
error log | 日志或报错信息 | ログ
ncnn版本 ncnn-20240410
pnnx版本 pnnx-20240410-linux
运行python3 readout_query_pnnx.py 输出nan
model | 模型 | モデル
how to reproduce | 复现步骤 | 再現方法
2.python3 readout_query_pnnx.py
The text was updated successfully, but these errors were encountered: