class_docstr: Region Proposal Network introduced in Faster R-CNN.
  
  This is Region Proposal Network introduced in Faster R-CNN [#]_.
  This takes features extracted from images and propose
  class agnostic bounding boxes around "objects".
  
  .. [#] Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.     Faster R-CNN: Towards Real-Time Object Detection with     Region Proposal Networks. NIPS 2015.
  
  Args:
      in_channels (int): The channel size of input.
      mid_channels (int): The channel size of the intermediate tensor.
      ratios (list of floats): This is ratios of width to height of
          the anchors.
      anchor_scales (list of numbers): This is areas of anchors.
          Those areas will be the product of the square of an element in
          :obj:`anchor_scales` and the original area of the reference
          window.
      feat_stride (int): Stride size after extracting features from an
          image.
      initialW (callable): Initial weight value. If :obj:`None` then this
          function uses Gaussian distribution scaled by 0.1 to
          initialize weight.
          May also be a callable that takes an array and edits its values.
      proposal_creator_params (dict): Key valued paramters for
          :class:`~chainercv.links.model.faster_rcnn.ProposalCreator`.
  
  .. seealso::
      :class:`~chainercv.links.model.faster_rcnn.ProposalCreator`
code: def __init__(
      self,
      in_channels=512,
      mid_channels=512,
      ratios=[0.5, 1, 2],
      anchor_scales=[8, 16, 32],
      feat_stride=16,
      initialW=None,
      proposal_creator_params={},
  ):
      self.anchor_base = generate_anchor_base(
          anchor_scales=anchor_scales, ratios=ratios
      )
      self.feat_stride = feat_stride
      self.proposal_layer = ProposalCreator(**proposal_creator_params)
  
      n_anchor = self.anchor_base.shape[0]
      super(RegionProposalNetwork, self).__init__()
      with self.init_scope():
          self.conv1 = L.Convolution2D(
              in_channels, mid_channels, 3, 1, 1, initialW=initialW
          )
          self.score = L.Convolution2D(
              mid_channels, n_anchor * 2, 1, 1, 0, initialW=initialW
          )
          self.loc = L.Convolution2D(
              mid_channels, n_anchor * 4, 1, 1, 0, initialW=initialW
          )
  
file_path: chainercv/chainercv/links/model/faster_rcnn/region_proposal_network.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  import chainer.links
  from chainercv.links.model.faster_rcnn.utils.generate_anchor_base import generate_anchor_base
  from chainercv.links.model.faster_rcnn.utils.proposal_creator import ProposalCreator
label_desc: Use image node_id 1 to create a new RegionProposalNetwork object from inherited base classes: chainer with example: obj = RegionProposalNetwork(in_channels, mid_channels, ratios, anchor_scales, feat_stride, initialW, proposal_creator_params)