Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
331 Views

Issue with executing created graph file for tensorflow

Hello,

 

I have created the graph file for NCSDK API and I am trying to deploy the graph file to the device. Initially I got an error which was related to python library and I fixed it. But executing the prediction code does nothing. The cursor keeps blinking for some time and stops. I am not sure whether the stick is executing my prediction and how long it might take. It has been more than 2 hours. I also post my code here for reference.

 

`import cv2

 

import numpy

 

import mvnc.mvncapi as mvnc

 

devices = mvnc.EnumerateDevices()

 

if len( devices ) == 0:

 

print( 'No devices found' )

 

quit()

 

device = mvnc.Device( devices[0] )

 

device.OpenDevice()

 

with open( 'mnist_inference.graph', mode='rb' ) as f:

 

blob = f.read()

 

graph = device.AllocateGraph( blob )

 

path = 'Defect.PNG'

 

img = cv2.imread(path, cv2.COLOR_BGR2RGB)

 

img = cv2.resize(img, (100, 25))

 

img = img.astype(numpy.float32)

 

output, userobj = graph.GetResult()

 

print('\n------- predictions --------')

 

print(output)

 

graph.DeallocateGraph()

 

device.CloseDevice()`
0 Kudos
2 Replies
idata
Community Manager
60 Views

Hi @sangathamilan

 

Which Neural Compute SDK version are you using? Could you share the graph file for me to reproduce?

 

Regards,

 

Jesus
idata
Community Manager
60 Views

Hello Jesus at Intel. I have fixed this issue. Seems I was using virtual env version of tensorflow which is not yet supported by NCS. Thanks for the reply

Reply