docstr: Get prior-boxes and pyramid-box
docstr_tok: ["Get","prior-boxes","and","pyramid-box"]
code: def _pyramidbox(self):
      """
      Get prior-boxes and pyramid-box
      """
      self.ssh_conv3_norm = self._l2_norm_scale(
          self.ssh_conv3, init_scale=10.0
      )
      self.ssh_conv4_norm = self._l2_norm_scale(
          self.ssh_conv4, init_scale=8.0
      )
      self.ssh_conv5_norm = self._l2_norm_scale(
          self.ssh_conv5, init_scale=5.0
      )
  
      def permute_and_reshape(input, last_dim):
          trans = fluid.layers.transpose(input, perm=[0, 2, 3, 1])
          compile_shape = [
              trans.shape[0],
              np.prod(trans.shape[1:]) // last_dim,
              last_dim,
          ]
          run_shape = fluid.layers.assign(
              np.array([0, -1, last_dim]).astype("int32")
          )
          return fluid.layers.reshape(
              trans, shape=compile_shape, actual_shape=run_shape
          )
  
      face_locs, face_confs = [], []
      head_locs, head_confs = [], []
      boxes, vars = [], []
      inputs = [
          self.ssh_conv3_norm,
          self.ssh_conv4_norm,
          self.ssh_conv5_norm,
          self.ssh_conv6,
          self.ssh_conv7,
          self.ssh_conv8,
      ]
      b_attr = ParamAttr(learning_rate=2.0, regularizer=L2Decay(0.0))
      for i, input in enumerate(inputs):
          mbox_loc = fluid.layers.conv2d(
              input, 8, 3, 1, 1, bias_attr=b_attr
          )
          face_loc, head_loc = fluid.layers.split(
              mbox_loc, num_or_sections=2, dim=1
          )
          face_loc = permute_and_reshape(face_loc, 4)
          head_loc = permute_and_reshape(head_loc, 4)
  
          mbox_conf = fluid.layers.conv2d(
              input, 6, 3, 1, 1, bias_attr=b_attr
          )
          face_conf1, face_conf3, head_conf = fluid.layers.split(
              mbox_conf, num_or_sections=[1, 3, 2], dim=1
          )
          face_conf3_maxin = fluid.layers.reduce_max(
              face_conf3, dim=1, keep_dim=True
          )
          face_conf = fluid.layers.concat(
              [face_conf1, face_conf3_maxin], axis=1
          )
  
          face_conf = permute_and_reshape(face_conf, 2)
          head_conf = permute_and_reshape(head_conf, 2)
  
          face_locs.append(face_loc)
          face_confs.append(face_conf)
  
          head_locs.append(head_loc)
          head_confs.append(head_conf)
  
          box, var = fluid.layers.prior_box(
              input,
              self.image,
              min_sizes=[self.min_sizes[i]],
              steps=[self.steps[i]] * 2,
              aspect_ratios=[1.0],
              clip=False,
              flip=True,
              offset=0.5,
          )
          box = fluid.layers.reshape(box, shape=[-1, 4])
          var = fluid.layers.reshape(var, shape=[-1, 4])
  
          boxes.append(box)
          vars.append(var)
  
      self.face_mbox_loc = fluid.layers.concat(face_locs, axis=1)
      self.face_mbox_conf = fluid.layers.concat(face_confs, axis=1)
  
      self.head_mbox_loc = fluid.layers.concat(head_locs, axis=1)
      self.head_mbox_conf = fluid.layers.concat(head_confs, axis=1)
  
      self.prior_boxes = fluid.layers.concat(boxes)
      self.box_vars = fluid.layers.concat(vars)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  import paddle.fluid
  from paddle.fluid.param_attr import ParamAttr
  from paddle.fluid.initializer import Xavier
  from paddle.fluid.initializer import Constant
  from paddle.fluid.initializer import Bilinear
  from paddle.fluid.regularizer import L2Decay
label_desc: Use image node_id 8 for calling the PyramidBox obj's underlying member method code with example usage: obj._pyramidbox() and returns: fluid