Forums - 'LayerParameter' object has no attribute 'ssd_permute_param'

9 posts / 0 new
Last post
'LayerParameter' object has no attribute 'ssd_permute_param'
omniengr77
Join Date: 13 Oct 16
Posts: 8
Posted: Thu, 2017-08-17 01:23

Hi,

I am creating .dlc file for the mobilenet-SSD from https://github.com/chuanqi305/MobileNet-SSD

snpe-caffe-to-dlc -c ~/tmp/mobilenet-ssd/MobileNet-SSD/MobileNetSSD_deploy.prototxt -b ~/tmp/mobilenet-ssd/caffe-ssd/caffe/MobileNetSSD_deploy.caffemodel

MobileNetSSD_deploy.caffemodel comes from: https://drive.google.com/open?id=0B3gersZ2cHIxVFI1Rjd5aDgwOG8

Error is below.

This caffe model uses "permte_param". Is this supported  by SNPE?

-------


snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv1/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv2/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv3/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv4/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv5/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv6/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv7/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv8/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv9/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv10/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv11/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv12/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
snpe_caffe_to_dlc.py:1474: RuntimeWarning: error_code=803; error_message=Layer parameters combination is invalid in GPU Layer conv13/dw: input depth must be divisible by 4 * number of groups; error_component=GPU Runtime; line_no=53; thread_id=139621265012544
  groups = groups)
Encountered Error: 'LayerParameter' object has no attribute 'ssd_permute_param'

Stack Trace:
Traceback (most recent call last):
  File "snpe-caffe-to-dlc", line 74, in <module>
    converter_command)
  File "snpe_caffe_to_dlc.py", line 952, in convert
    self.convert_caffe_new(self.spec)
  File "snpe_caffe_to_dlc.py", line 1068, in convert_caffe_new
    self.add_permute_layer(layer)
  File "snpe_caffe_to_dlc.py", line 1750, in add_permute_layer
    permute_param = layer.ssd_permute_param

 

 

 

 

 

 

  • Up0
  • Down0
Join Date: 14 Jun 17
Posts: 1
Posted: Mon, 2017-09-04 23:35

Hello,

Did you happen to get solution on this?

Is anyone from Qualcomm NPE team please reply on this as QC NPE do say that they support MobileNet SSD but we encountered issue of converting them to DLC. 

 

Thanks,

Jinay

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Wed, 2017-09-27 14:57

The actual error is : Encountered Error: 'LayerParameter' object has no attribute 'ssd_permute_param'

Looks like the problem has to do with SNPE improperly converting permute_param. When I fix permute_param, it still fails with :

2017-09-27 22:01:26,022 - 1258 - ERROR - ERROR_CAFFE_UDL_CANNOT_FIND_FACTORY_FUNC: Cannot find function PRIORBOX in supplied UDL factory function dictionary. Functions supplied were: {   }
ERROR_CAFFE_LAYER_TYPE_NOT_SUPPORTED: Cannot resolve conv11_mbox_priorbox layer of type PRIORBOX which is not yet supported by this conversion script.

 

Which looks like SNPE does not support type: "PriorBox" - looks like I can add a PriorBox UDL type to fix this as well.
 
Rex
  • Up0
  • Down0
jd404647184
Join Date: 27 Jun 17
Posts: 4
Posted: Thu, 2017-09-28 05:40

Could you help me?   How to fix permute_param?

  • Up0
  • Down0
jd404647184
Join Date: 27 Jun 17
Posts: 4
Posted: Thu, 2017-09-28 05:40

Could you help me?   How to fix permute_param?

  • Up0
  • Down0
liuqinglong110
Join Date: 13 Oct 17
Posts: 3
Posted: Thu, 2017-10-19 20:20

Hi, Rex

   I know SNPE does not support type: "PriorBox" .   Can you tell me how  to  add a PriorBox UDL type to fix this?

 

 

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Wed, 2017-11-22 16:54

@liuqinglong110 - adding UDL support is non-trivial. Your best bet is to follow the SDK instructions.

  • Up0
  • Down0
bspinar
Join Date: 4 Feb 15
Posts: 21
Posted: Mon, 2017-11-27 14:03

Just to echo and add to what Rex said... Some of the layers used in many of the SSD models (e.g. prior box) are not currently natively supported in SNPE. They can be implemented as UDLs and work reaosnably well as CPU UDLs as they are not computationally very expensive. The details on creating UDLs can be found in the SDK documentation (as Rex points out). Feel free to ask additional questions if you run into problems following the documentation. You might also search the forums as several people have already asked questions about issues they've encountered in creating UDLs.

While I can't give a timeline, we are looking into adding native support for several of these layers that are common in SSD style models.

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2019-03-12 06:34

Hi omniengr77,

You may installed caffe from BVLC. paramute_param layer is not supported in this implementation of BVLC/Caffe. Please install the
/caffe from given link which having the extension to ssd implementation.

Follow the below instruction to install caffe.
 

git clone https://github.com/weiliu89/caffe.git
cd caffe
git checkout ssd

# Modify Makefile.config according to your Caffe installation.
# Set option USE_OPENCV to 0 in Makefile.config
cp Makefile.config.example Makefile.config
make -j8
# Once done with the make py, please add $CAFFE_ROOT/python to your PYTHONPATH in .bashrc file.
make py
make test -j8
# (Optional)
make runtest -j8

Hope this will fix your issue.

 

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