code: def rpn_head(featuremap, channel, num_anchors):
      """
      Returns:
          label_logits: fHxfWxNA
          box_logits: fHxfWxNAx4
      """
      with argscope(
          Conv2D,
          data_format="channels_first",
          kernel_initializer=tf.random_normal_initializer(stddev=0.01),
      ):
          hidden = Conv2D(
              "conv0", featuremap, channel, 3, activation=tf.nn.relu
          )
  
          label_logits = Conv2D("class", hidden, num_anchors, 1)
          box_logits = Conv2D("box", hidden, 4 * num_anchors, 1)
          # 1, NA(*4), im/16, im/16 (NCHW)
  
          label_logits = tf.transpose(
              label_logits, [0, 2, 3, 1]
          )  # 1xfHxfWxNA
          label_logits = tf.squeeze(label_logits, 0)  # fHxfWxNA
  
          shp = tf.shape(box_logits)  # 1x(NAx4)xfHxfW
          box_logits = tf.transpose(
              box_logits, [0, 2, 3, 1]
          )  # 1xfHxfWx(NAx4)
          box_logits = tf.reshape(
              box_logits, tf.stack([shp[2], shp[3], num_anchors, 4])
          )  # fHxfWxNAx4
      return label_logits, box_logits
  
file_path: tensorpack/examples/FasterRCNN/modeling/model_rpn.py
imports: import tensorflow
  import numpy
  from tensorpack import tfv1
  from tensorpack.models import Conv2D, layer_register
  from tensorpack.tfutils.argscope import argscope
  from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope, under_name_scope
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils.argtools import memoized
  from config import config
  from .model_box import clip_boxes
label_desc: Use image node_id 1 for calling a global function with example usage: rpn_head(featuremap, channel, num_anchors) and returns: label_logits,  box_logits