Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

Can CNN-LSTM model execute inference on Intel NCS2?

nat98
New Contributor I
1,410 Views

Hello there,

 

I have a CNN-LSTM model that I would like to run inferences on the Intel Neural Compute Stick 2 (Intel NCS2).

 

There is no issue when I perform inference using Intel CPU with the following code:

 

$ source /opt/intel/openvino_2021.4.582/bin/setupvars.sh

$ python3 <custom python file> -m <.xml model file location> -i <input video location> -d CPU --labels <label file location>

 

However, when I perform the inference using Intel NCS2 by replacing the above code from 'CPU' to 'MYRIAD', I got the following error:

 

/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "disaster_sync_cnn-lstm.py", line 250, in <module>
sys.exit(main())
File "disaster_sync_cnn-lstm.py", line 116, in main
exec_net = ie.load_network(network=net, device_name=args.device)
File "ie_api.pyx", line 367, in openvino.inference_engine.ie_api.IECore.load_network
File "ie_api.pyx", line 379, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: [ GENERAL_ERROR ]
/home/jenkins/agent/workspace/private-ci/ie/build-linux-ubuntu18/b/repos/openvino/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_loop.cpp:46 Encountered unknown input type of a loop v5::Loop StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/while (StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/strided_slice[0]:i32{}, StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/while/ExecutionConditionValue[0]:boolean{}, StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/time[0]:i32{}, StatefulPartitionedCall/sequential_1/lstm/zeros/Broadcast[0]:f32{1,30}, StatefulPartitionedCall/sequential_1/lstm/zeros_1/Broadcast[0]:f32{1,30}, StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/strided_slice[0]:i32{}, StatefulPartitionedCall/sequential_1/lstm/PartitionedCall/transpose[0]:f32{30,1,25088}) -> (f32{30,1,30}) at index 0

 

Note that other model such as CNN have no inference problem using both Intel CPU and Intel NCS2.

 

Therefore, does Intel NCS2 not support CNN-LSTM model inference?

 

Regards,

nat98

1 Solution
IntelSupport
Moderator
1,288 Views

Hi Nat98,

 

As for the latest release, Loop-5 operation is supported only by the CPU and GPU plugins. I will escalate your feature request for Loop-5 support with MYRIAD plugin to the development team. However, we cannot comment on future changes or any planned features, because they might be subject to changes. You can always refer to our Release Notes.

 

For Raspberry Pi, I would suggest you to post your question Raspberry Pi forum for assistance.


Meanwhile, Intel® NCS 2 is being EOL-ed with Last Product Discontinuance Shipment Date on 30 June 2022. Intel will continue to offer NCS2 Support as per the timeline below:

  • Technical Support Ends – 30 June 2023
  • Warranty Support Ends – 30 June 2024-

 

The suggested immediate replacement product for NCS2 is MX HDDL M.2 cards.

 

 

Regards,

Aznie


View solution in original post

0 Kudos
5 Replies
IntelSupport
Moderator
1,383 Views

Hi Nat98,

 

Thanks for reaching out.

 

For Inference Engine, LSTMCell and LSTMSequence are supported by VPU plugin, which supports Intel® Neural Compute Stick 2. You may check the Supported Layers documentation for the list of supported layers by Plugin with OpenVINO.

 

In your case, the issue is due to Loop-5 operation is not supported by the MYRIAD plugin. This information is available in the  Release Notes.

 

 

Regards,

Aznie


0 Kudos
nat98
New Contributor I
1,366 Views

Hi Aznie,

 

Thanks for your reply.

 

As I further look into the error of Loop-5 operation, I found a post from 2021 facing a similar issue. Link: https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Encountered-unknown-input-type-of-a-loop-v5-Loop/m-p/1289475/

 

Seems like the MYRIAD plugin does not support Loop-5 operation since last time and does not support now.

 

Any insights as to adding the support anytime soon?

 

Regards,

nat98

0 Kudos
nat98
New Contributor I
1,300 Views

Hi Aznie,

 

Note that I plan to implement my models in Raspberry Pi.

 

Since the issue is due to the Loop-5 operation is not supported by the MYRIAD plugin, any alternative that I can consider to perform the inference?

 

Also, may I know the reason why Raspberry Pi is seldom available on the market? And is there no more new stock for Intel NCS2 (product discontinued?)?

 

Regards,

nat98

0 Kudos
IntelSupport
Moderator
1,289 Views

Hi Nat98,

 

As for the latest release, Loop-5 operation is supported only by the CPU and GPU plugins. I will escalate your feature request for Loop-5 support with MYRIAD plugin to the development team. However, we cannot comment on future changes or any planned features, because they might be subject to changes. You can always refer to our Release Notes.

 

For Raspberry Pi, I would suggest you to post your question Raspberry Pi forum for assistance.


Meanwhile, Intel® NCS 2 is being EOL-ed with Last Product Discontinuance Shipment Date on 30 June 2022. Intel will continue to offer NCS2 Support as per the timeline below:

  • Technical Support Ends – 30 June 2023
  • Warranty Support Ends – 30 June 2024-

 

The suggested immediate replacement product for NCS2 is MX HDDL M.2 cards.

 

 

Regards,

Aznie


0 Kudos
IntelSupport
Moderator
825 Views

Hi Nat98,


This thread will no longer be monitored since we have provided information. If you need any additional information from Intel, please submit a new question.



Regards,

Aznie


0 Kudos
Reply