daquexian / onnx-simplifier

Simplify your onnx model
Apache License 2.0
3.75k stars 379 forks source link

[Unrecognized attribute: ceil_mode for operator MaxPool] #85

Open Eliza-and-black opened 4 years ago

Eliza-and-black commented 4 years ago

Describe the bug File "/opt/python3.7/lib/python3.7/site-packages/onnx/checker.py", line 86, in check_model C.check_model(model.SerializeToString()) onnx.onnx_cpp2py_export.checker.ValidationError: Unrecognized attribute: ceil_mode for operator MaxPool

==> Context: Bad node spec: input: "1045" output: "1046" op_type: "MaxPool" attribute { name: "ceil_mode" i: 0 type: INT } attribute { name: "kernel_shape" ints: 13 ints: 13 type: INTS } attribute { name: "pads" ints: 6 ints: 6 ints: 6 ints: 6 type: INTS } attribute { name: "strides" ints: 1 ints: 1 type: INTS }

Model I have seed my model to daquexian566@gmail.com. The model named " yolov4_1_3_416_416.onnx". Waiting for your answer.

Eliza-and-black commented 4 years ago

What's more,my torch vision ==1.3.0,and onnx vision ==1.4.1.

Eliza-and-black commented 4 years ago

when I set torch.onnx.export to opset_version=9, this error disappear. This link show the difference between opset-visions