Giter Club home page Giter Club logo

Comments (6)

GeorgeS2019 avatar GeorgeS2019 commented on September 26, 2024 1

label this issue csharp?

from onnxruntime.

yuslepukhin avatar yuslepukhin commented on September 26, 2024

How large is your model? Can you share it via a file sharing service?

from onnxruntime.

rghavimi avatar rghavimi commented on September 26, 2024

Here is the model:
https://www.transfernow.net/dl/20240329yKmybLR9

from onnxruntime.

yuslepukhin avatar yuslepukhin commented on September 26, 2024

C# code does not parse protobuf. It is parsed by google library. I will investigate if we could make it a better error message. Said that, here is some python code that also runs onnx library checker and points to a problem with the model even before InferenceSession is invoked.

import onnxruntime
import numpy as np
import onnx

model_path='model.onnx'

model = onnx.load(model_path)
onnx.checker.check_model(model)

session_options = onnxruntime.SessionOptions()
session_options.log_severity_level = 4
session_options.enable_mem_reuse = False
sess = onnxruntime.InferenceSession(
    model,
    sess_options=session_options,
    providers=["CPUExecutionProvider"],
)

LayerNormalization op appeared in ONNX starting with opset 17.

https://github.com/onnx/onnx/blob/main/docs/Operators.md#LayerNormalization

Traceback (most recent call last):
File "d:\dev\data\BadProtobuf\ort_optimize.py", line 8, in
onnx.checker.check_model(model)
File "c:\Python\lib\site-packages\onnx\checker.py", line 179, in check_model
C.check_model(
onnx.onnx_cpp2py_export.checker.ValidationError: No Op registered for LayerNormalization with domain_version of 11

==> Context: Bad node spec for node. Name: LayerNormalization OpType: LayerNormalization

from onnxruntime.

yuslepukhin avatar yuslepukhin commented on September 26, 2024

Your model imports ONNX domain opset11

image

from onnxruntime.

yuslepukhin avatar yuslepukhin commented on September 26, 2024

I will check with the converter folks to see what may have gone wrong.

from onnxruntime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.