class_docstr: Build PPYOLOE distill model, only used in PPYOLOE
  Args:
      cfg: The student config.
      slim_cfg: The teacher and distill config.
class_docstr_tok: ["Build","PPYOLOE","distill","model",",","only","used","in","PPYOLOE","Args",":","cfg",":","The","student","config",".","slim_cfg",":","The","teacher","and","distill","config","."]
code: def forward(self, inputs, alpha=0.125):
      if self.training:
          with paddle.no_grad():
              teacher_loss = self.teacher_model(inputs)
          if hasattr(self.teacher_model.yolo_head, "assigned_labels"):
              (
                  self.student_model.yolo_head.assigned_labels,
                  self.student_model.yolo_head.assigned_bboxes,
                  self.student_model.yolo_head.assigned_scores,
              ) = (
                  self.teacher_model.yolo_head.assigned_labels,
                  self.teacher_model.yolo_head.assigned_bboxes,
                  self.teacher_model.yolo_head.assigned_scores,
              )
              delattr(self.teacher_model.yolo_head, "assigned_labels")
              delattr(self.teacher_model.yolo_head, "assigned_bboxes")
              delattr(self.teacher_model.yolo_head, "assigned_scores")
          student_loss = self.student_model(inputs)
  
          logits_loss, feat_loss = self.distill_loss(
              self.teacher_model, self.student_model
          )
          det_total_loss = student_loss["loss"]
          total_loss = alpha * (
              det_total_loss + logits_loss + feat_loss
          )
          student_loss["loss"] = total_loss
          student_loss["det_loss"] = det_total_loss
          student_loss["logits_loss"] = logits_loss
          student_loss["feat_loss"] = feat_loss
          return student_loss
      else:
          return self.student_model(inputs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  from ppdet.core.workspace import register, create, load_config
  from ppdet.utils.checkpoint import load_pretrain_weight
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the PPYOLOEDistillModel obj's underlying member method code with example usage: obj.forward(inputs, alpha) and returns: student_loss, self