pytorch,onnx
问题
No Op registered for GridSampler with domain_version of 11
==> Context: Bad node spec: input: “386” input: “466” output: “467” name: “GridSampler_195” op_type: “GridSampler” attribute { name: “aligncorners” i: 0 type: INT } attribute { name: “interpolationmode” i: 0 type: INT } attribute { name: “paddingmode” i: 0 type: INT }
解决方案
我参考onnxparser-trt-plugin-sample这里写的onnx::grid_sampler pytorch转onnx插件,问题出在导出onnx时,需要将enable_onnx_checker=False
设置为False