[Python] failure to load an onnx model

Discussão em 'Python' iniciado por Stack, Dezembro 21, 2024.

  1. Stack

    Stack Membro Participativo

    Traceback (most recent call last):
    File "/workspace/data/extract_features/model_check.py", line 4, in <module>
    model = onnx.load(model_path)
    File "/usr/local/lib/python3.10/dist-packages/onnx/__init__.py", line 170, in load_model
    model = load_model_from_string(s, format=format)
    File "/usr/local/lib/python3.10/dist-packages/onnx/__init__.py", line 212, in load_model_from_string
    return _deserialize(s, ModelProto())
    File "/usr/local/lib/python3.10/dist-packages/onnx/__init__.py", line 143, in _deserialize
    decoded = typing.cast(Optional[int], proto.ParseFromString(s))
    google.protobuf.message.DecodeError: Error parsing message with type 'onnx.ModelProto'


    i got some information online. Some said the model was incomplete.But I don't think so. So I need someone who has the similar experience to help me solve the problem

    Continue reading...

Compartilhe esta Página