docstr: Tests we're returning consistent shapes.
  
  We test both the case where we're training and the case where we are
  not.
docstr_tok: ["Tests","we","'re","returning","consistent","shapes",".","We","test","both","the","case","where","we","'re","training","and","the","case","where","we","are","not","."]
code: def testReturningShapes(self):
      """Tests we're returning consistent shapes.
  
      We test both the case where we're training and the case where we are
      not.
      """
  
      # Prediction session (not training)
      rcnn_net_not_training = self._shared_model(
          self._pretrained_feature_map_ph,
          self._proposals_ph,
          self._image_shape_ph,
          self._base_network,
      )
  
      prediction_dict_not_training = self._run_net_with_feed_dict(
          rcnn_net_not_training,
          feed_dict={
              self._pretrained_feature_map_ph: np.random.rand(
                  *self._pretrained_feature_map_shape
              ),
              self._proposals_ph: np.random.randint(
                  low=0,
                  high=np.amin(self._image_shape),
                  size=self._proposals_shape,
              ),
              self._image_shape_ph: self._image_shape,
          },
      )
      # Training session
      rcnn_net_training = self._shared_model(
          self._pretrained_feature_map_ph,
          self._proposals_ph,
          self._image_shape_ph,
          self._base_network,
          self._gt_boxes_ph,
      )
      prediction_dict_training = self._run_net_with_feed_dict(
          rcnn_net_training,
          feed_dict={
              self._pretrained_feature_map_ph: np.random.rand(
                  *self._pretrained_feature_map_shape
              ),
              self._proposals_ph: np.random.randint(
                  low=0,
                  high=np.amin(self._image_shape),
                  size=self._proposals_shape,
              ),
              self._image_shape_ph: self._image_shape,
              self._gt_boxes_ph: np.random.randint(
                  low=0,
                  high=np.amin(self._image_shape),
                  size=self._gt_boxes_shape,
              ),
          },
      )
      # Assertions
      self._check_returning_shapes(prediction_dict_not_training)
      self._check_returning_shapes(
          prediction_dict_training, training=True
      )
  
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 4 for calling the RCNNTest obj's underlying member method code with example usage: obj.testReturningShapes() without return types