Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a class for ONNX models #980

Merged
merged 1 commit into from
Sep 17, 2022

Conversation

RunDevelopment
Copy link
Member

Changes:

  • ONNX models are now wrapped in a class that only contains the model bytes.
  • The inference session is now lazily created using the get_onnx_session function. This function will create a new session if no existing session is associated with the model.
  • Fixed that ConvertOnnxToNcnnNode still used the old type and crashed at runtime.

The divide between the model (bytes) and the inference session is necessary because the model class defines an interface that has to be usable even if the ONNX runtime package isn't present and no inference session can be created.

@joeyballentine joeyballentine merged commit 33312d2 into chaiNNer-org:main Sep 17, 2022
@RunDevelopment RunDevelopment deleted the onnx-model-class branch September 17, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants