code: def setUp(self):
      tf.reset_default_graph()
  
      self._num_classes = 5
      self._num_proposals = 256
      self._total_num_gt = 128
      self._image_shape = (600, 800)
      # The score we'll give to the true labels when testing for perfect
      # score generation.
      self._high_score = 100
  
      self._equality_delta = 1e-03
  
      self._config = EasyDict(
          {
              "enabled": True,
              "layer_sizes": [4096, 4096],
              "dropout_keep_prob": 1.0,
              "activation_function": "relu6",
              "use_mean": False,
              "target_normalization_variances": [1.0, 1.0],
              "rcnn_initializer": {
                  "type": "variance_scaling_initializer",
                  "factor": 1.0,
                  "uniform": True,
                  "mode": "FAN_AVG",
              },
              "bbox_initializer": {
                  "type": "variance_scaling_initializer",
                  "factor": 1.0,
                  "uniform": True,
                  "mode": "FAN_AVG",
              },
              "cls_initializer": {
                  "type": "variance_scaling_initializer",
                  "factor": 1.0,
                  "uniform": True,
                  "mode": "FAN_AVG",
              },
              "l2_regularization_scale": 0.0005,
              "l1_sigma": 3.0,
              "roi": {
                  "pooling_mode": "crop",
                  "pooled_width": 7,
                  "pooled_height": 7,
                  "padding": "VALID",
              },
              "proposals": {
                  "class_max_detections": 100,
                  "class_nms_threshold": 0.6,
                  "total_max_detections": 300,
                  "min_prob_threshold": 0.0,
              },
              "target": {
                  "foreground_fraction": 0.25,
                  "minibatch_size": 64,
                  "foreground_threshold": 0.5,
                  "background_threshold_high": 0.5,
                  "background_threshold_low": 0.1,
                  "target_normalization_variances": [1.0, 1.0],
              },
          }
      )
  
      self._base_network = MockBaseNetwork()
      self._shared_model = RCNN(self._num_classes, self._config)
  
      # Declare placeholders
      # We use the '_ph' suffix for placeholders.
      self._pretrained_feature_map_shape = (
          self._num_proposals,
          self._config.roi.pooled_width,
          self._config.roi.pooled_height,
          4,
      )
      self._pretrained_feature_map_ph = tf.placeholder(
          tf.float32, shape=self._pretrained_feature_map_shape
      )
  
      self._proposals_shape = (self._num_proposals, 4)
      self._proposals_ph = tf.placeholder(
          tf.float32, shape=self._proposals_shape
      )
  
      self._image_shape_shape = (2,)
      self._image_shape_ph = tf.placeholder(
          tf.float32, shape=self._image_shape_shape
      )
  
      self._gt_boxes_shape = (self._total_num_gt, 5)
      self._gt_boxes_ph = tf.placeholder(
          tf.float32, shape=self._gt_boxes_shape
      )
  
file_path: luminoth/luminoth/models/fasterrcnn/rcnn_test.py
imports: import numpy
  import tensorflow
  from easydict import EasyDict
  from luminoth.models.fasterrcnn.rcnn import RCNN
label_desc: Use image node_id 1 for calling the RCNNTest obj's underlying member method code with example usage: obj.setUp() without return types