Forums - Convert AlexNet DLC failed

4 posts / 0 new
Last post
Convert AlexNet DLC failed
ysh329
Join Date: 25 Jul 18
Posts: 31
Posted: Mon, 2019-03-18 03:47

Hi, I tried the command from docs as below:

root@1460a0e00f8b:/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/scripts# ls ~/tmpdir/

bvlc_alexnet.caffemodel  caffe_ilsvrc12.tar.gz  deploy.prototxt

root@1460a0e00f8b:/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/scripts# python $SNPE_ROOT/models/alexnet/scripts/setup_alexnet.py -a ~/tmpdir   

Copying Caffe model

Modiying prototxt to use a batch size of 1

Creating DLC

before create call

['snpe-caffe-to-dlc', '--caffe_txt', '/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/deploy_batch_1.prototxt', '--caffe_bin', '/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/bvlc_alexnet.caffemodel', '--dlc', '/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/dlc/bvlc_alexnet.dlc']

snpe-caffe-to-dlc --caffe_txt /home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/deploy_batch_1.prototxt --caffe_bin /home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/bvlc_alexnet.caffemodel --dlc /home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/dlc/bvlc_alexnet.dlc

ERROR: [Errno 2] No such file or directory

*/

Have any idea? thanks in advance.

  • Up0
  • Down0
jihoonk
Profile picture
Join Date: 28 Jan 13
Location: Seoul
Posts: 55
Posted: Mon, 2019-03-18 17:19

Hi ysh329,

First, check if following files exist.

/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/deploy_batch_1.prototxt

/home/yuanshuai/snpe/snpe-1.23.1.245/models/alexnet/caffe/bvlc_alexnet.caffemodel 

Thanks,

jihoonk

  • Up0
  • Down0
ysh329
Join Date: 25 Jul 18
Posts: 31
Posted: Tue, 2019-03-19 05:55

Thanks your reply.

I fixed this issue by debug the code: generate its shell command and execute command. However, another issue found: not found module snpe and I using `sys.path.append` append Python library of SNPE. Besides, an issue again with a dynamic library not found and I fixed it by `export` this library to `LD_LIBYRARY_PATH`.

 

That's all. Thanks

  • Up0
  • Down0
ysh329
Join Date: 25 Jul 18
Posts: 31
Posted: Tue, 2019-03-19 05:58

However, but the ERROR: [Errno 2] No such file or directory still exists when using command:

 

python $SNPE_ROOT/models/alexnet/scripts/setup_alexnet.py -a ~/tmpdir   

 

I Debuged code and found its about 101st line about subprocess. I think you can replace the subprocess with os.system, which may fix this problem. thanks

  • 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.