Forums - Failed convertig Caffee Model to DLC Error

5 posts / 0 new
Last post
Failed convertig Caffee Model to DLC Error
bnarendar89
Join Date: 21 Jan 19
Posts: 5
Posted: Thu, 2019-01-24 23:22

Hi ,

I have followed the doc to explore the SNPE SDK ,

While excuting the "python2.7 ./models/alexnet/scripts/setup_alexnet.py -a ./temp-assets-cache -d" to Download and convert a pre-trained Alexnet example in Caffe format. However it is giving the followig error:

Creating DLC
Traceback (most recent call last):
  File "/home/tcs/caffe/snpe-sdk/snpe-1.22.0.212/bin/x86_64-linux-clanCreating DLC
Traceback (most recent call last):
  File "/home/tcs/caffe/snpe-sdk/snpe-1.22.0.212/bin/x86_64-linux-clang/snpe-caffe-to-dlc", line 18, in <module>
    from snpe import snpe_utils
  File "/home/tcs/caffe/snpe-sdk/snpe-1.22.0.212/lib/python/snpe/__init__.py", line 11, in <module>
    from . import libDlModelToolsPy3 as modeltools
ImportError: libpython3.4m.so.1.0: cannot open shared object file: No such file or directoryg/snpe-caffe-to-dlc", line 18, in <module>
    from snpe import snpe_utils
  File "/home/tcs/caffe/snpe-sdk/snpe-1.22.0.212/lib/python/snpe/__init__.py", line 11, in <module>
    from . import libDlModelToolsPy3 as modeltools
ImportError: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory

I Request your help to resolve the issue.

Thanks,

Narendar.

  • Up0
  • Down0
y-yamashita
Join Date: 1 Nov 18
Posts: 4
Posted: Fri, 2019-01-25 00:33
I fixed it by installing Python 3.4. I think that the description with reference guide 2.7 is probably wrong
  • Up0
  • Down0
jihoonk
Profile picture
Join Date: 28 Jan 13
Location: Seoul
Posts: 55
Posted: Fri, 2019-01-25 00:34

Hi bnarendar89,

It seems your python environment has issues. While your command is python2.7, the error message is related to python3.4. It's weird situation. How about installing python 3.4 and trying again with it?

Thanks,

Jihoon

  • Up0
  • Down0
bnarendar89
Join Date: 21 Jan 19
Posts: 5
Posted: Fri, 2019-01-25 04:01

HI ,

Thanks for your reply.

I have used the command as python3.4 or python3.7 , i am getting following error:

Traceback (most recent call last):
  File "./models/alexnet/scripts/setup_alexnet.py", line 10, in <module>
    import caffe
  File "/home/tcs/caffe/build/install/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/tcs/caffe/build/install/python/caffe/pycaffe.py", line 11, in <module>
    import numpy as np
ImportError: No module named 'numpy'
 

Thanks,

Narendar.

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Mon, 2019-02-04 23:31

Hi Narendar,

 

The error is because of unavailability of “numpy” library.

You can install with the help of below mentioned commands,

For python2:

$  wget https://bootstrap.pypa.io/get-pip.py

$ sudo python2 get-pip.py

$ sudo pip2 install numpy

 

For python3:.

$  wget https://bootstrap.pypa.io/get-pip.py

$ sudo python3 get-pip.py

$ sudo pip3 install numpy

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.