code: def fastrcnn_outputs(
      feature, num_categories, class_agnostic_regression=False
  ):
      """
      Args:
          feature (any shape):
          num_categories (int):
          class_agnostic_regression (bool): if True, regression to N x 1 x 4
  
      Returns:
          cls_logits: N x num_class classification logits
          reg_logits: N x num_classx4 or Nx1x4 if class agnostic
      """
      num_classes = num_categories + 1
      classification = FullyConnected(
          "class",
          feature,
          num_classes,
          kernel_initializer=tf.random_normal_initializer(stddev=0.01),
      )
      num_classes_for_box = (
          1 if class_agnostic_regression else num_classes
      )
      box_regression = FullyConnected(
          "box",
          feature,
          num_classes_for_box * 4,
          kernel_initializer=tf.random_normal_initializer(stddev=0.001),
      )
      box_regression = tf.reshape(
          box_regression,
          (-1, num_classes_for_box, 4),
          name="output_box",
      )
      return classification, box_regression
  
imports: import tensorflow
  from tensorpack import tfv1
  from tensorpack.models import Conv2D, FullyConnected, layer_register
  from tensorpack.tfutils.argscope import argscope
  from tensorpack.tfutils.scope_utils import under_name_scope
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils.argtools import memoized_method
  from config import config
  from utils.box_ops import pairwise_iou
  from .model_box import decode_bbox_target, encode_bbox_target
  from .backbone import GroupNorm
label_desc: Use image node_id 3 for calling a global function with example usage: fastrcnn_outputs(feature, num_categories, class_agnostic_regression) and returns: classification,  box_regression