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

Error importing caffe!

I've searched all methods through the website and it took me almost ONE day, but it seems not work.

 

I checked the numpy path, upgraded it, and added the caffe path to $PYTHONPATH……

 

Hope some expert could help. Thx very much! Here is the compile result:

 

 

pi@raspberrypi:~/ncsexp/ncappzoo/caffe/TinyYolo $ make compile

 

making prototxt

 

Prototxt file already exists

 

making caffemodel

 

caffemodel file already exists

 

making compile

 

mvNCCompile -o graph -w tiny-yolo-v1_53000.caffemodel -s 12 tiny-yolo-v1.prototxt

 

mvNCCompile v02.00, Copyright @ Movidius Ltd 2016

 

Error importing caffe

 

pi@raspberrypi:~/ncsexp/ncappzoo/caffe/TinyYolo $ echo $PYTHONPATH

 

/opt/movidius/caffe/python:

 

 

pi@raspberrypi:~/ncsexp/ncappzoo/caffe/TinyYolo $ python3

 

Python 3.5.3 (default, Sep 27 2018, 17:25:39)

 

[GCC 6.3.0 20170516] on linux

 

Type "help", "copyright", "credits" or "license" for more information.

 

 

 

 

import caffe

 

Traceback (most recent call last):

 

File "", line 1, in

 

File "/opt/movidius/caffe/python/caffe/init.py", line 1, in

 

from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver

 

File "/opt/movidius/caffe/python/caffe/pycaffe.py", line 15, in

 

import caffe.io

 

File "/opt/movidius/caffe/python/caffe/io.py", line 2, in

 

import skimage.io

 

File "/usr/local/lib/python3.5/dist-packages/skimage/init.py", line 167, in

 

from .util.dtype import (img_as_float32,

 

File "/usr/local/lib/python3.5/dist-packages/skimage/util/init.py", line 8, in

 

from .arraycrop import crop

 

File "/usr/local/lib/python3.5/dist-packages/skimage/util/arraycrop.py", line 8, in

 

from numpy.lib.arraypad import _validate_lengths

 

ImportError: cannot import name '_validate_lengths'

 

 

 

Tags (1)
0 Kudos
1 Reply
idata
Community Manager
228 Views

Hey guys…I've solved the problem by adding two function in numpy.lib.arraypad for realizing the '_validate_lengths'. Thx!

Reply