class_docstr: Implement DirectPose.
class_docstr_tok: ["Implement","DirectPose","."]
code: def forward_head(self, features, top_module=None):
      features = [features[f] for f in self.in_features]
      (
          logits_pred,
          bbox_reg_pred,
          kpt_reg_pred,
          ctrness_pred,
          top_feats,
          kpts_towers,
          hms,
      ) = self.directpose_head(
          features, top_module, self.yield_proposal
      )
      return (
          logits_pred,
          bbox_reg_pred,
          kpt_reg_pred,
          ctrness_pred,
          top_feats,
          kpts_towers,
          hms,
      )
  
imports: import math
  from typing import List, Dict
  import torch
  from torch import nn
  from torch.nn import functional
  from torch.autograd import Variable
  import numpy
  from ...utils.comm import compute_locations
  from ...nn.shape_spec import ShapeSpec
  from ...nn.batch_norm import NaiveSyncBatchNorm
  from ...nn.deform_conv import DeformConvWithChangeableStride
  from ...nn.group_norm import NaiveGroupNorm
  from .directpose_outputs import DirectPoseOutputs
label_desc: Use image node_id 2 for calling the DirectPose obj's underlying member method code with example usage: obj.forward_head(features, top_module) and returns: logits_pred,  bbox_reg_pred,  kpt_reg_pred,  ctrness_pred,  top_feats,  kpts_towers,  hms