code: def create_fast_rcnn_model(
      features,
      roi_proposals,
      label_targets,
      bbox_targets,
      bbox_inside_weights,
      cfg,
  ):
      # Load the pre-trained classification net and clone layers
      base_model = load_model(cfg["BASE_MODEL_PATH"])
      conv_layers = clone_conv_layers(base_model, cfg)
      fc_layers = clone_model(
          base_model,
          [cfg["MODEL"].POOL_NODE_NAME],
          [cfg["MODEL"].LAST_HIDDEN_NODE_NAME],
          clone_method=CloneMethod.clone,
      )
  
      # Normalization and conv layers
      feat_norm = features - Constant(
          [[[v]] for v in cfg["MODEL"].IMG_PAD_COLOR]
      )
      conv_out = conv_layers(feat_norm)
  
      # Fast RCNN and losses
      cls_score, bbox_pred = create_fast_rcnn_predictor(
          conv_out, roi_proposals, fc_layers, cfg
      )
      detection_losses = create_detection_losses(
          cls_score,
          label_targets,
          bbox_pred,
          roi_proposals,
          bbox_targets,
          bbox_inside_weights,
          cfg,
      )
      pred_error = classification_error(
          cls_score, label_targets, axis=1
      )
  
      return detection_losses, pred_error
  
imports: from __future__ import print_function
  import numpy
  import os, sys
  import argparse
  import easydict
  import cntk
  from cntk import Trainer, load_model, Axis, input_variable, parameter, times, combine, softmax, roipooling, plus, element_times, CloneMethod, alias, Communicator, reduce_sum
  from cntk.core import Value
  from cntk.initializer import normal
  from cntk.layers import placeholder, Constant, Sequential
  from cntk.learners import momentum_sgd, learning_parameter_schedule_per_sample, momentum_schedule
  from cntk.logging import log_number_of_parameters, ProgressPrinter
  from cntk.logging.graph import find_by_name, plot
  from cntk.losses import cross_entropy_with_softmax
  from cntk.metrics import classification_error
  from _cntk_py import force_deterministic_algorithms
  from utils.rpn.cntk_smoothL1_loss import SmoothL1Loss
  from utils.annotations.annotations_helper import parse_class_map_file
  from utils.od_mb_source import ObjectDetectionMinibatchSource
  from utils.proposal_helpers import ProposalProvider
label_desc: Use image node_id 6 for calling a global function with example usage: create_fast_rcnn_model(features, roi_proposals, label_targets, bbox_targets, bbox_inside_weights, cfg) and returns: detection_losses,  pred_error