Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

No API found in Python for stateful models

Jia3Xu
Employee
135 Views

Hi

I've a model in pytorch and output it to onnx. Now I want to make it stateful.

Since my model does not contains LSTM/RNN/GRU cell so I use model optimizer to convert it by --transform "makestateful".  and generate IR.

I've checked IR which indeed has type="ReadValue" version="opset6" values. but the model's output and input disappears when pyopenvino compiled the model.

 

 

besides I also noticed in the document says "Working with these intermediate values of each iteration is enabled by special LowLatency and LowLatency2 transformations"

I my understand, the stateful models is supported only after transforms to LowLatency2, by using 

InferenceEngine::lowLatency2(cnnNetwork); 

but I haven't found any API in python can convert this. 

 

is there any way or examples of who python deal with stateful models?

0 Kudos
1 Reply
Peh_Intel
Moderator
105 Views

Hi Jia3Xu,


Thanks to reaching out to us.


Based on the documentation, it is only available for OpenVINO Runtime C++ API.


Let us get back to you at the earliest once we get further clarification on this.



Regards,

Peh


Reply