天天看點

【pytorch】——No Op registered for GridSampler with domain_version of 11

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

繼續閱讀