Added method to create tensors and models from data in memory. #264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.