- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Traceback (most recent call last):
File "run.py", line 14, in
import mvnc_simple_api as mvnc
File "../../ncapi2_shim/mvnc_simple_api.py", line 10, in
class mvncStatus(Enum):
File "../../ncapi2_shim/mvnc_simple_api.py", line 23, in mvncStatus
NOT_ALLOCATED = mvncapi2.Status.NOT_ALLOCATED
File "/usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py", line 46, in getattr
return getattr(self.new_target, attr)
File "/usr/lib/python3.5/enum.py", line 274, in getattr
raise AttributeError(name) from None
AttributeError: NOT_ALLOCATED
- Tags:
- Import
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem.
If you solve this problem,could you share it with me ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Were you able to solve it? I'm running the hello_ncs_py code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the same problem usig ncsdk2 with movidus NCS 1 for the ncappzoo example code video_face_matcher.
The solution for me was commenting out the line the line 8
#import mvnc_simple_api as mvnc
and uncommenting the line 9
from mvnc import mvncapi as mvnc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am also getting the NOT_ALLOCATED problem.
Here is my experiment.
I created the XML and BIN files using the openvino_2019.1.144.
With the XML I created the Movidius specific graph file as below:
/opt/intel/openvino_2019.1.144/deployment_tools/inference_engine/lib/intel64/myriad_compile -m model/FP16/serialized.xml -o graph_file_for_tm_npu -VPU_PLATFORM VPU_2480 -VPU_NUMBER_OF_SHAVES 4 -VPU_NUMBER_OF_CMX_SLICES 4
Now for the generated graph_file_for_tm_npu file, I am trying to import the graph using the following code:
"""NCAPI v2"""
### initialization
# from mvnc import mvncapi
# import mvnc.mvncapi as fx
from mvnc import mvncapi as mvnc
######################## Device Initialization #######################
device_list = mvnc.enumerate_devices()
device = mvnc.Device(device_list[0])
########################################################################
device.open()
####################### Load Neural Network ########################
# Initialize a graph from file at some GRAPH_FILEPATH
GRAPH_FILEPATH = 'model/graph/graph_file_for_tm_npu'
with open(GRAPH_FILEPATH, mode='rb') as f:
graph_buffer = f.read()
graph = mvnc.Graph('model/graph/graph_file_for_tm_npu')
print("able to read the graph successfully .... !")
input_descs = graph.get_option(mvnc.GraphOption.RO_INPUT_TENSOR_DESCRIPTORS)
print(input_descs)
# CONVENIENCE FUNCTION:
# Allocate the graph to the device and create input/output Fifos with default options in one call
# input_fifo, output_fifo = graph.allocate_with_fifos(device, graph_buffer)
########################################################################
device.close()
device.destroy()
But I am getting the following error:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-1-ac2630ebc6c8> in <module>
26 print("able to read the graph successfully .... !")
27
---> 28 input_descs = graph.get_option(mvnc.GraphOption.RO_INPUT_TENSOR_DESCRIPTORS)
29
30 print(input_descs)
/usr/lib/python3.5/site-packages/mvnc/mvncapi.py in get_option(self, option)
688 self.handle, GraphOption.RO_INPUT_COUNT.value, byref(desc_count), byref(optsize))
689 if status != Status.OK.value:
--> 690 raise Exception(Status(status))
691
692 # Create an appropriately sized buffer for getting the TensorDescriptor data
Exception: Status.NOT_ALLOCATED
Please let me know how to resolve this problem.
Thanks
Kind Regards
Arun
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page