-
Notifications
You must be signed in to change notification settings - Fork 377
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
[BUG] Resize simplifier behavior should be change #34
Comments
this can call
|
I think it is a bug of onnx (onnx/onnx#2417) and not related to onnxsim itself. Please re-export your onnx model according to what onnx/onnx#1385 (comment) suggests |
thanks for reply, better to say, this is a pytorch exporting bug. I have posted an optimization issue in pytorch. However, do u have any suggestions on the simplifier result of such situation? Why it does failed when convert? (actually I think the simplify process is right and reasonable) Just can not convert to tensorrt |
No, it's an onnx bug, please check out onnx/onnx#2198 |
Have you tried re-export your onnx model by adding |
That doesn't help. the intializers were generated after simplified. What I am concern is that, this is a common issue, if you call But actually, we only might need a single resize op with a What if to change this param of |
The initializer might be the root reason. this can be solve on pytorch side, onnx side, or onnxsimplifier side, or even onnx-tensorrt side. But none of them do this..... |
Sorry, I didn't understand you. |
Sorry
this advise is not help.it's the same, and not the root reason for problem. Anyway, not related to onnxsimplifier. Since onnxsimpifier is just wrapper of onnx |
If you are asking about the |
我也遇到resize转换出来一堆乱七八糟东西的情况,没搞定,于是就直接改ncnn模型了 |
nihui 大佬... 向大佬低头。 BTW, 我发现可以通过手动移花接木化解它,需要对ONNX做一些更加精细的外科手术 |
@nihui 大佬,按照你的意思pytorch中x=F.interpolate(input=x,size=(self.up_size, self.up_size), mode='bilinear') 导出onnx再转ncnn单独修改ncnn模型就行了吗,我使用op9可以导出来的是upsample op,我想问的是直接将这个转ncnn再修改ncnn模型,输出结果会一致吗! |
Now the model simplified like this:
But, we need convert to tensorrt, and when convert to trt, we gots:
The text was updated successfully, but these errors were encountered: