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 method to create tensors and models from data in memory. #264

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

8-byte
Copy link
Contributor

@8-byte 8-byte commented Aug 15, 2024

Added static member to tensor class to allows the creation of a tensor directly from an existing buffer without having to create a copy as a std:vector. Specially useful when the input already exists in raw format in memory and has a significant footprint.
Also added member to model class to allow building a model from a buffer already in memory that's been loaded with the content of a saved model file. While this use case may appear obscure, there are cases where a stand-alone application needs to be distributed with encrypted models that are only decrypted in memory.
Note: the fix on the status member was an oversight while merging my old codebase with the new fork of cppflow:master. The new fixed constructor model compiles and runs as expected.

@8-byte 8-byte changed the title Added method to create tensor from a raw data buffer. Added method to create tensors and models from data in memory. Aug 15, 2024
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.

1 participant