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.
6574 Discussions

Unsupported Slice operation using Tensorflow

idata
Employee
1,698 Views

Hi,

 

I'm trying to deploy my own Tensorflow network on the Movidius NCS and I'm experiencing some issues with the Slice operation.

 

I tried a simple slicing operation (e.g., extracting the first channel from an image)

 

output = tf.slice(input, [0, 0, 0, 0], [-1, -1, -1, 1])

 

but when I try to profile the network i get this error: [Error 5] Toolkit Error: Stage Details Not Supported: Slice type not supported

 

I'm running 1.11.00 release, according to https://github.com/movidius/ncsdk/releases/tag/v1.11.00.04 the slice operation seems to be supported.

 

Thanks
0 Kudos
4 Replies
idata
Employee
1,410 Views

@mpoggi Thanks for bringing this to our attention. We should have support for the Tensorflow Slice operation. Can you provide the code you tested with the steps to reproduce the issue so that we can help debug the issue that you are facing? Thanks in advance.

0 Kudos
idata
Employee
1,410 Views

Thanks for yout help, you can find my code at https://pastebin.com/RV6ZvLtu (myNet.py script).

 

The code contains a flag, USING_SLICE: if set to True, the network uses a Slice op, otherwise it does not.

 

I simply tried to profile the network, running

 

python myNet.py

 

mvNCProfile -s 12 output/myNet.meta -in=input -on=result/add

 

If USING_SLICE is set to False, the profile runs smooth, while I get the "Error 5" if I set it to True.

 

Thanks
0 Kudos
idata
Employee
1,410 Views

@Tome_at_Intel I found the problem, "-1" indexing is not supported and I need to pass the dimension of the tensor:

 

output = tf.slice(input, [0, 0, 0, 0], [output.get_shape().as_list()[0], output.get_shape().as_list()[1], output.get_shape().as_list()[2], 1])

 

Moreover, I tried to slice on dimensions 1 and 2 (i.e., reducing height and width), but it seems to be not supported according to /opt/movidius/NCSDK/ncsdk-x86_64/tk/Controllers/TensorFlowParser.py, line 1489. Any plan to make it supported?

 

Thanks
0 Kudos
idata
Employee
1,410 Views

@mpoggi With regards to the Slice support, we plan add additional layer support as needed by our developers. We can't make any promises, we will keep all feature requests in mind when building future releases. Thank you for your understanding and patience.

0 Kudos
Reply