class_docstr: ReitinaFace
  
  RetinaFace: Single-stage Dense Face Localisation in the Wild.
  Described in https://arxiv.org/abs/1905.00641.
  
  Args:
      cfg (`Dict`):
          Network related settings.
      phase (`str`):
          train or test.
class_docstr_tok: ["ReitinaFace","RetinaFace",":","Single-stage","Dense","Face","Localisation","in","the","Wild",".","Described","in","https",":","\/\/arxiv.org\/abs\/1905.00641",".","Args",":","cfg","(","`","Dict","`",")",":","Network","related","settings",".","phase","(","`","str","`",")",":","train","or","test","."]
code: def forward(self, inputs: torch.FloatTensor):
      out = self.body(inputs)
  
      # FPN
      fpn = self.fpn(out)
  
      # SSH
      feature1 = self.ssh1(fpn[0])
      feature2 = self.ssh2(fpn[1])
      feature3 = self.ssh3(fpn[2])
      features = [feature1, feature2, feature3]
  
      bbox_regressions = torch.cat(
          [
              self.bbox_head[i](feature)
              for i, feature in enumerate(features)
          ],
          dim=1,
      )
      classifications = torch.cat(
          [
              self.class_head[i](feature)
              for i, feature in enumerate(features)
          ],
          dim=1,
      )
      ldm_regressions = torch.cat(
          [
              self.landmark_head[i](feature)
              for i, feature in enumerate(features)
          ],
          dim=1,
      )
  
      if self.phase == "train":
          output = (bbox_regressions, classifications, ldm_regressions)
      else:
          output = (
              bbox_regressions,
              F.softmax(classifications, dim=-1),
              ldm_regressions,
          )
      return output
  
imports: from typing import Tuple, Dict
  import numpy
  import torch
  from torch import nn
  import torch.nn.functional
  import torchvision
  from torchvision import models
  from towhee.models.retina_face.ssh import SSH
  from towhee.models.retina_face.mobilenet_v1 import MobileNetV1
  from towhee.models.retina_face.retinaface_fpn import RetinaFaceFPN
  from towhee.models.retina_face.heads import ClassHead, BboxHead, LandmarkHead
  from towhee.models.retina_face.prior_box import PriorBox
  from towhee.models.retina_face.utils import decode, decode_landm, IntermediateLayerGetter
label_desc: Use image node_id 5 for calling the RetinaFace obj's underlying member method code with example usage: obj.forward(inputs) and returns: output