class_docstr: SSD model is like a Tree, except with additional handling for the output layer, and
  for the prior boxes
class_docstr_tok: ["SSD","model","is","like","a","Tree",",","except","with","additional","handling","for","the","output","layer",",","and","for","the","prior","boxes"]
docstr: Given a key to the ssd_config, generate the leafs
docstr_tok: ["Given","a","key","to","the","ssd_config",",","generate","the","leafs"]
code: def generate_leafs(self, layer):
      """
      Given a key to the ssd_config, generate the leafs
      """
      config = self.ssd_config[layer]
  
      leaf_params = {
          "strides": 1,
          "padding": 1,
          "init": Xavier(local=True),
          "bias": Constant(0),
      }
  
      # to match caffe layer's naming
      if config["normalize"]:
          layer += "_norm"
  
      priorbox_args = self.get_priorbox_args(config)
      mbox_prior = PriorBox(**priorbox_args)
      num_priors = mbox_prior.num_priors_per_pixel
  
      loc_name = layer + "_mbox_loc"
      mbox_loc = Conv(
          (3, 3, 4 * num_priors), name=loc_name, **leaf_params
      )
  
      conf_name = layer + "_mbox_conf"
      mbox_conf = Conv(
          (3, 3, self.num_classes * num_priors),
          name=conf_name,
          **leaf_params,
      )
  
      return {
          "mbox_prior": mbox_prior,
          "mbox_loc": mbox_loc,
          "mbox_conf": mbox_conf,
      }
  
imports: from neon.initializers import Constant, Xavier
  from neon.transforms import Rectlin
  from neon.layers import Conv, Pooling, BranchNode
  from layer import Normalize, PriorBox, DetectionOutput, ConcatTranspose
  import numpy
  from neon.util.persist import load_obj
  from neon.layers.container import Tree
  from neon.layers.layer import Layer
  from collections import OrderedDict
  import inspect
  import re
  from neon.data.datasets import Dataset
  import os
label_desc: Use image node_id 11 for calling the SSD obj's underlying member method code with example usage: obj.generate_leafs(layer) and returns: dict