class_docstr: Faster R-CNN network, see https://arxiv.org/abs/1506.01497
  
  Args:
      backbone (object): backbone instance
      rpn_head (object): `RPNHead` instance
      bbox_head (object): `BBoxHead` instance
      bbox_post_process (object): `BBoxPostProcess` instance
      neck (object): 'FPN' instance
class_docstr_tok: ["Faster","R-CNN","network",",","see","https",":","\/\/arxiv.org\/abs\/1506.01497","Args",":","backbone","(","object",")",":","backbone","instance","rpn_head","(","object",")",":","`","RPNHead","`","instance","bbox_head","(","object",")",":","`","BBoxHead","`","instance","bbox_post_process","(","object",")",":","`","BBoxPostProcess","`","instance","neck","(","object",")",":","'FPN","'","instance"]
code: def relationship_learning(self, loader, num_classes_novel):
      print("computing relationship")
      train_labels_list = []
      label_list = []
  
      for step_id, data in enumerate(loader):
          _, bbox_prob = self.target_bbox_forward(data)
          batch_size = data["im_id"].shape[0]
          for i in range(batch_size):
              num_bbox = data["gt_class"][i].shape[0]
              train_labels = data["gt_class"][i]
              train_labels_list.append(train_labels.numpy().squeeze(1))
          base_labels = bbox_prob.detach().numpy()[:, :-1]
          label_list.append(base_labels)
  
      labels = np.concatenate(train_labels_list, 0)
      probabilities = np.concatenate(label_list, 0)
      N_t = np.max(labels) + 1
      conditional = []
      for i in range(N_t):
          this_class = probabilities[labels == i]
          average = np.mean(this_class, axis=0, keepdims=True)
          conditional.append(average)
      return np.concatenate(conditional)
  
file_path: PaddleDetection/ppdet/modeling/architectures/faster_rcnn.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register, create
  from .meta_arch import BaseArch
  import numpy
label_desc: Use image node_id 8 for calling the FasterRCNN obj's underlying member method code with example usage: obj.relationship_learning(loader, num_classes_novel) and returns: np