Replies: 1 comment
-
May I ask if you have solved it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
thanks for your contribution to this project.
I am going through this yomo-wamedge-tensorflow project, and trying to figure out if we can implement a similar thing in Rust so we can perform ML on streaming video data with WASM.
And I found that the Module and NewTensorflowModule, etc. are seem like missed in the wasmedge package. I didn't find them in all sub-directories/file under wasmedge.
type WasmObj struct {
conf *wasmedge.Configure
vm *wasmedge.VM
tfobj *wasmedge.Module
tfliteobj *wasmedge.Module
}`
var tfobj = wasmedge.NewTensorflowModule()
var tfliteobj = wasmedge.NewTensorflowLiteModule()
the wasmedge package I referred to is from here https://github.com/second-state/WasmEdge-go/blob/master/wasmedge
Another question related to this demo is about the infer() function in lib.rs.
It looks like in the infer() function, the model_data will be loaded and a new session will be created every time the infer() function is called in VM.
let model_data: &[u8] = include_bytes!("lite-model_aiy_vision_classifier_food_V1_1.tflite");
let mut session = wasmedge_tensorflow_interface::Session::new(&model_data, wasmedge_tensorflow_interface::ModelType::TensorFlowLite, );
I am wondering if is there a way to reuse allocated resources in memory, like reusing the session?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions