class_docstr: Head block for Face detection network
  
  Args:
      num_classes (int): Number of output classes.
      in_channels (int): Number of input channels.
      anchor_generator(object): instance of anchor genertor method.
      kernel_size (int): kernel size of Conv2D in FaceHead.
      padding (int): padding of Conv2D in FaceHead.
      conv_decay (float): norm_decay (float): weight decay for conv layer weights.
      loss (object): loss of face detection model.
class_docstr_tok: ["Head","block","for","Face","detection","network","Args",":","num_classes","(","int",")",":","Number","of","output","classes",".","in_channels","(","int",")",":","Number","of","input","channels",".","anchor_generator","(","object",")",":","instance","of","anchor","genertor","method",".","kernel_size","(","int",")",":","kernel","size","of","Conv2D","in","FaceHead",".","padding","(","int",")",":","padding","of","Conv2D","in","FaceHead",".","conv_decay","(","float",")",":","norm_decay","(","float",")",":","weight","decay","for","conv","layer","weights",".","loss","(","object",")",":","loss","of","face","detection","model","."]
code: def __init__(
      self,
      num_classes=80,
      in_channels=[96, 96],
      anchor_generator=_get_class_default_kwargs(AnchorGeneratorSSD),
      kernel_size=3,
      padding=1,
      conv_decay=0.0,
      loss="SSDLoss",
  ):
      super(FaceHead, self).__init__()
      # add background class
      self.num_classes = num_classes + 1
      self.in_channels = in_channels
      self.anchor_generator = anchor_generator
      self.loss = loss
  
      if isinstance(anchor_generator, dict):
          self.anchor_generator = AnchorGeneratorSSD(**anchor_generator)
  
      self.num_priors = self.anchor_generator.num_priors
      self.box_convs = []
      self.score_convs = []
      for i, num_prior in enumerate(self.num_priors):
          box_conv_name = "boxes{}".format(i)
          box_conv = self.add_sublayer(
              box_conv_name,
              nn.Conv2D(
                  in_channels=self.in_channels[i],
                  out_channels=num_prior * 4,
                  kernel_size=kernel_size,
                  padding=padding,
              ),
          )
          self.box_convs.append(box_conv)
  
          score_conv_name = "scores{}".format(i)
          score_conv = self.add_sublayer(
              score_conv_name,
              nn.Conv2D(
                  in_channels=self.in_channels[i],
                  out_channels=num_prior * self.num_classes,
                  kernel_size=kernel_size,
                  padding=padding,
              ),
          )
          self.score_convs.append(score_conv)
  
file_path: PaddleDetection/ppdet/modeling/heads/face_head.py
imports: import paddle
  import paddle.nn
  from ppdet.core.workspace import register
  from ..layers import AnchorGeneratorSSD
  from ..cls_utils import _get_class_default_kwargs
label_desc: Use image node_id 1 to create a new FaceHead object from inherited base classes: nn with example: obj = FaceHead(num_classes, in_channels, anchor_generator, kernel_size, padding, conv_decay, loss)