Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Alert: Beginning Tuesday, June 25th, we will be freezing this site and migrating the content and forums to our new home at Check it out now!

Exception: Status.ERROR while running custom model

We are trying a simple classification model originally developed in tensorflow/keras and converted using NCSDK.
The conversion was successful creating a graphfile, however during inference we see following error.
We did execute other scripts default in ncsappzoo, they tend to work but not this.

Are we missing something??


Start download to NCS...
E: [ 0] dispatcherEventReceive:236 dispatcherEventReceive() Read failed -4

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

E: [ 0] ncFifoReadElem:2736 Failed to read fifo element

Traceback (most recent call last):
File "", line 47, in
output, userobj = graph.GetResult()
File "../../ncapi2_shim/", line 156, in GetResult
output, userobj = self._api2_fifo_out.read_elem()
File "/usr/local/lib/python3.5/dist-packages/mvnc/", line 412, in read_elem
raise Exception(Status(status))
Exception: Status.ERROR

The script for execution is as follows

import sys
sys.path.insert(0, "../../ncapi2_shim")
import mvnc_simple_api as mvnc
import numpy
import cv2

path_to_networks = './'
path_to_images = '.'
graph_file_name = './graph_new_2'

devices = mvnc.EnumerateDevices()
if len(devices) == 0:
print('No devices found')
device = mvnc.Device(devices[0])


categories = [0,1]

with open(graph_file_name, mode='rb') as f:
graph_in_memory =

reqsize = 300

graph = device.AllocateGraph(graph_in_memory)

img = cv2.imread("img.png").astype(numpy.float32)

dx,dy,dz= img.shape

img = cv2.resize(img, (reqsize, reqsize))



print('Start download to NCS...')

graph.LoadTensor(img.astype(numpy.float16), 'user object')

output, userobj = graph.GetResult()




  • 1 Comment sorted by Votes Date Added
  • I encounter the same problem.
    The platform is x86_64, Ubuntu 16.04.
    NCSDK version is .
    I compile the SSD_MobileNet graph in ncappzoo2.
    The example I am using is live-object-detector in ncappzoo.
    I add "import mvnc_simple_api as mvnc" into to make it run on NCSDK2.
    Usually, Status.ERROR comes in an hour.
    I also see the NCS is disconnected and connected again.
    I think the NCS is reset like what the error message said.

    Is there any way to dump the NCS to check what exact problem is?
    If we can't avoid the the NCS's resetting, how to add error handling in live-object-detector? Re-open the device for a while?

This discussion has been closed.