class_docstr: PKD: General Distillation Framework for Object Detectors via Pearson Correlation Coefficient.
  
  Args:
      loss_weight (float): Weight of loss. Defaults to 1.0.
      resize_stu (bool): If True, we'll down/up sample the features of the
          student model to the spatial size of those of the teacher model if
          their spatial sizes are different. And vice versa. Defaults to
          True.
class_docstr_tok: ["PKD",":","General","Distillation","Framework","for","Object","Detectors","via","Pearson","Correlation","Coefficient",".","Args",":","loss_weight","(","float",")",":","Weight","of","loss",".","Defaults","to","1.0.","resize_stu","(","bool",")",":","If","True",",","we","'ll","down\/up","sample","the","features","of","the","student","model","to","the","spatial","size","of","those","of","the","teacher","model","if","their","spatial","sizes","are","different",".","And","vice","versa",".","Defaults","to","True","."]
code: def forward(self, stu_feature, tea_feature, inputs=None):
      size_s, size_t = stu_feature.shape[2:], tea_feature.shape[2:]
      if size_s[0] != size_t[0]:
          if self.resize_stu:
              stu_feature = F.interpolate(
                  stu_feature, size_t, mode="bilinear"
              )
          else:
              tea_feature = F.interpolate(
                  tea_feature, size_s, mode="bilinear"
              )
      assert stu_feature.shape == tea_feature.shape
  
      if self.normalize:
          stu_feature = feature_norm(stu_feature)
          tea_feature = feature_norm(tea_feature)
  
      loss = F.mse_loss(stu_feature, tea_feature) / 2
      return loss * self.loss_weight
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from ppdet.core.workspace import register
  from ppdet.modeling import ops
  from ppdet.modeling.losses.iou_loss import GIoULoss
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the PKDFeatureLoss obj's underlying member method code with example usage: obj.forward(stu_feature, tea_feature, inputs) and returns: unknown