Skip to content

[ShapeInferenceError] Inferred shape and existing shape differ in rank: (4) vs (0) #70

@hilaryliang

Description

@hilaryliang

hi
i try to simplify the .onnx

Simplifying...
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/efficientformer/bin/onnxsim", line 8, in
sys.exit(main())
File "/home/ubuntu/miniconda3/envs/efficientformer/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py", line 489, in main
model_opt, check_ok = simplify(
File "/home/ubuntu/miniconda3/envs/efficientformer/lib/python3.8/site-packages/onnxsim/onnx_simplifier.py", line 199, in simplify
model_opt_bytes = C.simplify(
onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] (op_type:Conv, node name: Conv_339): [ShapeInferenceError] Inferred shape and existing shape differ in rank: (4) vs (0)

and then i output the shape of my seg onnx

Image

Looking forward to your answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions