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.

tensorflow reshape not working on Myriad X

idata
Employee
1,027 Views

Hi,

 

I got this error when I tried to run mvNCCheck on a graph with the tf.reshape() op.

 

Network Input tensors ['inp:0#6']

 

Network Output tensors ['out:0#11']

 

Blob generated

 

USB: Transferring Data…

 

USB: Myriad Execution Finished

 

Output is in Channel Minor format

 

USB: Myriad Connection Closing.

 

E: [ 0] dispatcherEventReceive:247 dispatcherEventReceive() Read failed -1

 

E: [ 0] eventReader:254 Failed to receive event, the device may have reset

 

E: [ 0] checkGraphMonitorResponse:922 XLink error

 

Traceback (most recent call last):

 

File "/usr/local/bin/mvNCCheck", line 228, in

 

quit_code = check_net(args.network, args.image, args.inputnode, args.outputnode, args.nshaves, args.inputsize, args.weights, args)

 

File "/usr/local/bin/mvNCCheck", line 202, in check_net

 

timings, myriad_output = run_myriad(graph_file, args)

 

File "/usr/local/bin/ncsdk/Controllers/MiscIO.py", line 335, in run_myriad

 

graph.destroy()

 

File "/usr/local/lib/python3.6/dist-packages/mvnc/mvncapi.py", line 778, in destroy

 

raise Exception(Status(status))

 

Exception: Status.ERROR

 

====================================

 

Below is simple code to reproduce the error:

 

import tensorflow as tf

 

import os

 

os.environ['CUDA_VISIBLE_DEVICES'] = str(-1)

 

x = tf.placeholder(tf.float32, [1, 3, 6, 9], name='inp')

 

x = tf.contrib.layers.conv2d(x, 9, 1)

 

y = tf.reshape(x, [1, 162], name='out')

 

saver = tf.train.Saver()

 

with tf.Session() as sess:

 

sess.run(tf.global_variables_initializer())

 

saver.save(sess, ''path/to/save/my_model')

 

======================================

 

This is how I ran mvNCCheck

 

mvNCCheck path/to/save/my_model.meta -w path/to/save/my_model -in inp -on out

 

If I remove tf.reshape(), everything works fine. Any thoughts on why this is happening?

0 Kudos
1 Reply
idata
Employee
759 Views

Hi @yatao

 

Are you using the Intel Neural Compute Stick 2? If so, you will need to use OpenVINO as the Neural Compute SDK only supports the original Intel Neural Compute Stick.

 

Take a look at the get started guide: https://software.intel.com/en-us/neural-compute-stick/get-started

 

Regards,

 

Jesus
0 Kudos
Reply