onnx.onnx_cpp2py_export.checker.ValidationError: Node () has input size 1 not in range [min=2, max=3].

See original GitHub issue

Hi all~

I’m converting a pytorch model to an onnx model. The convert process doesn’t report any error or warning. But when I check the onnx model, using this function:

onnx.checker.check_model(model)

I get the following error:

onnx.onnx_cpp2py_export.checker.ValidationError: Node () has input size 1 not in range [min=2, max=3].

==> Context: Bad node spec: input: "626" output: "634" op_type: "Pad" attribute { name: "mode" s: "constant" type: STRING } attribute { name: "pads" ints: 0 ints: 0 ints: 1 ints: 1 ints: 0 ints: 0 ints: 1 ints: 1 type: INTS } attribute { name: "value" f: 0 type: FLOAT }

Can anyone help me? Thank you very much!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mrlzlacommented, Jan 22, 2020

Fixed when upgraded to pytorch 1.4.0

0reactions
mrlzlacommented, Jan 22, 2020

Same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node (086_upsample) has input size 1 not in range [min=2 ...
삽질 기록. onnx.onnx_cpp2py_export.checker.ValidationError: Node (086_upsample) has input size 1 not in range [min=2, max=2]. 꾸준희 2019.
Read more >
some question converting pyTorch model to ONNX
I want to convert my pyTorch model to ONNX. However, I get an error saying that: RuntimeError: Node (Concat_0) has input size 0...
Read more >
TensorRT's OnnxParser problem - NVIDIA Developer Forums
EDIT Dec 3rd, 11:32 (GMT+1): Fixed some mistakes in the ... ValidationError: Node (Unsqueeze_575) has input size 1 not in range [min=2, ...
Read more >
How to convert F.interpolate to onnx? - PyTorch Forums
I've converted an east model into ONNX,but when checking model ... ValidationError: Node () has input size 4 not in range [min=2, max=2]....
Read more >
AttributeError when converting onnx model using ... - Kneron
I already tried Pytorch 1.2 / 1.5.1 / 1.8 version, its still error. The following is my command and model file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found