class_docstr: Region Proposal Network of Feature Pyramid Networks.
  
  Args:
      scales (tuple of floats): The scales of feature maps.
class_docstr_tok: ["Region","Proposal","Network","of","Feature","Pyramid","Networks",".","Args",":","scales","(","tuple","of","floats",")",":","The","scales","of","feature","maps","."]
docstr: Calculates RoIs.
  
  Args:
      hs (iterable of array): An iterable of feature maps.
  
  Returns:
      tuple of two arrays:
      :obj:`locs` and :obj:`confs`.
  
      * **locs**: A list of arrays whose shape is                 :math:`(N, K_l, 4)`, where :math:`N` is the size of batch and                 :math:`K_l` is the number of the anchor boxes                 of the :math:`l`-th level.
      " **confs**: A list of array whose shape is :math:`(N, K_l)`.
docstr_tok: ["Calculates","RoIs",".","Args",":","hs","(","iterable","of","array",")",":","An","iterable","of","feature","maps",".","Returns",":","tuple","of","two","arrays",":",":","obj",":","`","locs","`","and",":","obj",":","`","confs","`",".","*","*","*","locs","*","*",":","A","list","of","arrays","whose","shape","is",":","math",":","`","(","N",",","K_l",",","4",")","`",",","where",":","math",":","`","N","`","is","the","size","of","batch","and",":","math",":","`","K_l","`","is","the","number","of","the","anchor","boxes","of","the",":","math",":","`","l","`","-th","level.","``","*","*","confs","*","*",":","A","list","of","array","whose","shape","is",":","math",":","`","(","N",",","K_l",")","`","."]
code: def forward(self, hs):
      """Calculates RoIs.
  
          Args:
              hs (iterable of array): An iterable of feature maps.
  
          Returns:
              tuple of two arrays:
              :obj:`locs` and :obj:`confs`.
  
              * **locs**: A list of arrays whose shape is \
                  :math:`(N, K_l, 4)`, where :math:`N` is the size of batch and \
                  :math:`K_l` is the number of the anchor boxes \
                  of the :math:`l`-th level.
              " **confs**: A list of array whose shape is :math:`(N, K_l)`.
          """
  
      locs = []
      confs = []
      for h in hs:
          h = F.relu(self.conv(h))
  
          loc = self.loc(h)
          loc = F.transpose(loc, (0, 2, 3, 1))
          loc = F.reshape(loc, (loc.shape[0], -1, 4))
          locs.append(loc)
  
          conf = self.conf(h)
          conf = F.transpose(conf, (0, 2, 3, 1))
          conf = F.reshape(conf, (conf.shape[0], -1))
          confs.append(conf)
  
      return locs, confs
  
file_path: chainercv/chainercv/links/model/fpn/rpn.py
imports: from __future__ import division
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainer import initializers
  import chainer.links
  from chainercv.links.model.fpn.misc import argsort
  from chainercv.links.model.fpn.misc import choice
  from chainercv.links.model.fpn.misc import exp_clip
  from chainercv.links.model.fpn.misc import smooth_l1
  from chainercv import utils
label_desc: Use image node_id 2 for calling the RPN obj's underlying member method code with example usage: obj.forward(hs) and returns: locs,  confs