class_docstr: Build common distill model.
  Args:
      cfg: The student config.
      slim_cfg: The teacher and distill config.
class_docstr_tok: ["Build","common","distill","model",".","Args",":","cfg",":","The","student","config",".","slim_cfg",":","The","teacher","and","distill","config","."]
code: def forward(self, inputs):
      if self.training:
          student_loss = self.student_model(inputs)
          with paddle.no_grad():
              teacher_loss = self.teacher_model(inputs)
  
          loss = self.distill_loss(
              self.teacher_model, self.student_model
          )
          student_loss["distill_loss"] = loss
          student_loss["teacher_loss"] = teacher_loss["loss"]
          student_loss["loss"] += student_loss["distill_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 4 for calling the DistillModel obj's underlying member method code with example usage: obj.forward(inputs) and returns: student_loss, self