class_docstr: FCIS based on ResNet101.
  
  When you specify the path of a pre-trained chainer model serialized as
  a :obj:`.npz` file in the constructor, this chain model automatically
  initializes all the parameters with it.
  When a string in prespecified set is provided, a pretrained model is
  loaded from weights distributed on the Internet.
  The list of pretrained models supported are as follows:
  
  * :obj:`sbd`: Loads weights trained with the trainval split of Semantic     Boundaries Dataset.
  
  For descriptions on the interface of this model, please refer to
  :class:`~chainercv.experimental.links.model.fcis.FCIS`.
  
  :class:`~chainercv.experimental.links.model.fcis.FCISResNet101`
  supports finer control on random initializations of weights by arguments
  :obj:`resnet_initialW`, :obj:`rpn_initialW` and :obj:`head_initialW`.
  It accepts a callable that takes an array and edits its values.
  If :obj:`None` is passed as an initializer, the default initializer is
  used.
  
  Args:
      n_fg_class (int): The number of classes excluding the background.
      pretrained_model (str): The destination of the pre-trained
          chainer model serialized as a :obj:`.npz` file.
          If this is one of the strings described
          above, it automatically loads weights stored under a directory
          :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/models/`,
          where :obj:`$CHAINER_DATASET_ROOT` is set as
          :obj:`$HOME/.chainer/dataset` unless you specify another value
          by modifying the environment variable.
      min_size (int): A preprocessing paramter for :meth:`prepare`.
      max_size (int): A preprocessing paramter for :meth:`prepare`.
      roi_size (int): Height and width of the feature maps after
          Position Sensitive RoI pooling.
      group_size (int): Group height and width for Position Sensitive
          ROI pooling.
      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.
      loc_normalize_mean (tuple of four floats): Mean values of
          localization estimates.
      loc_normalize_std (tupler of four floats): Standard deviation
          of localization estimates.
      iter2 (bool): if the value is set :obj:`True`, Position Sensitive
          ROI pooling is executed twice. In the second time, Position
          Sensitive ROI pooling uses improved ROIs by the localization
          parameters calculated in the first time.
      resnet_initialW (callable): Initializer for the layers corresponding to
          the ResNet101 layers.
      rpn_initialW (callable): Initializer for Region Proposal Network
          layers.
      head_initialW (callable): Initializer for the head layers.
      proposal_creator_params (dict): Key valued paramters for
          :class:`~chainercv.links.model.faster_rcnn.ProposalCreator`.
class_docstr_tok: ["FCIS","based","on","ResNet101",".","When","you","specify","the","path","of","a","pre-trained","chainer","model","serialized","as","a",":","obj",":","`",".npz","`","file","in","the","constructor",",","this","chain","model","automatically","initializes","all","the","parameters","with","it",".","When","a","string","in","prespecified","set","is","provided",",","a","pretrained","model","is","loaded","from","weights","distributed","on","the","Internet",".","The","list","of","pretrained","models","supported","are","as","follows",":","*",":","obj",":","`","sbd","`",":","Loads","weights","trained","with","the","trainval","split","of","Semantic","Boundaries","Dataset",".","For","descriptions","on","the","interface","of","this","model",",","please","refer","to",":","class",":","`","~chainercv.experimental.links.model.fcis.FCIS","`",".",":","class",":","`","~chainercv.experimental.links.model.fcis.FCISResNet101","`","supports","finer","control","on","random","initializations","of","weights","by","arguments",":","obj",":","`","resnet_initialW","`",",",":","obj",":","`","rpn_initialW","`","and",":","obj",":","`","head_initialW","`",".","It","accepts","a","callable","that","takes","an","array","and","edits","its","values",".","If",":","obj",":","`","None","`","is","passed","as","an","initializer",",","the","default","initializer","is","used",".","Args",":","n_fg_class","(","int",")",":","The","number","of","classes","excluding","the","background",".","pretrained_model","(","str",")",":","The","destination","of","the","pre-trained","chainer","model","serialized","as","a",":","obj",":","`",".npz","`","file",".","If","this","is","one","of","the","strings","described","above",",","it","automatically","loads","weights","stored","under","a","directory",":","obj",":","`","$","CHAINER_DATASET_ROOT\/pfnet\/chainercv\/models\/","`",",","where",":","obj",":","`","$","CHAINER_DATASET_ROOT","`","is","set","as",":","obj",":","`","$","HOME\/.chainer\/dataset","`","unless","you","specify","another","value","by","modifying","the","environment","variable",".","min_size","(","int",")",":","A","preprocessing","paramter","for",":","meth",":","`","prepare","`",".","max_size","(","int",")",":","A","preprocessing","paramter","for",":","meth",":","`","prepare","`",".","roi_size","(","int",")",":","Height","and","width","of","the","feature","maps","after","Position","Sensitive","RoI","pooling",".","group_size","(","int",")",":","Group","height","and","width","for","Position","Sensitive","ROI","pooling",".","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",".","loc_normalize_mean","(","tuple","of","four","floats",")",":","Mean","values","of","localization","estimates",".","loc_normalize_std","(","tupler","of","four","floats",")",":","Standard","deviation","of","localization","estimates",".","iter2","(","bool",")",":","if","the","value","is","set",":","obj",":","`","True","`",",","Position","Sensitive","ROI","pooling","is","executed","twice",".","In","the","second","time",",","Position","Sensitive","ROI","pooling","uses","improved","ROIs","by","the","localization","parameters","calculated","in","the","first","time",".","resnet_initialW","(","callable",")",":","Initializer","for","the","layers","corresponding","to","the","ResNet101","layers",".","rpn_initialW","(","callable",")",":","Initializer","for","Region","Proposal","Network","layers",".","head_initialW","(","callable",")",":","Initializer","for","the","head","layers",".","proposal_creator_params","(","dict",")",":","Key","valued","paramters","for",":","class",":","`","~chainercv.links.model.faster_rcnn.ProposalCreator","`","."]
code: def __init__(
      self,
      n_fg_class=None,
      pretrained_model=None,
      min_size=600,
      max_size=1000,
      roi_size=21,
      group_size=7,
      ratios=[0.5, 1, 2],
      anchor_scales=[8, 16, 32],
      loc_normalize_mean=(0.0, 0.0, 0.0, 0.0),
      loc_normalize_std=(0.2, 0.2, 0.5, 0.5),
      iter2=True,
      resnet_initialW=None,
      rpn_initialW=None,
      head_initialW=None,
      proposal_creator_params=None,
  ):
      param, path = utils.prepare_pretrained_model(
          {"n_fg_class": n_fg_class}, pretrained_model, self._models
      )
  
      if rpn_initialW is None:
          rpn_initialW = chainer.initializers.Normal(0.01)
      if resnet_initialW is None and pretrained_model:
          resnet_initialW = chainer.initializers.constant.Zero()
      if proposal_creator_params is not None:
          self.proposal_creator_params = proposal_creator_params
  
      extractor = ResNet101Extractor(initialW=resnet_initialW)
      rpn = RegionProposalNetwork(
          1024,
          512,
          ratios=ratios,
          anchor_scales=anchor_scales,
          feat_stride=self.feat_stride,
          initialW=rpn_initialW,
          proposal_creator_params=self.proposal_creator_params,
      )
      head = FCISResNet101Head(
          param["n_fg_class"] + 1,
          roi_size=roi_size,
          group_size=group_size,
          spatial_scale=1.0 / self.feat_stride,
          loc_normalize_mean=loc_normalize_mean,
          loc_normalize_std=loc_normalize_std,
          iter2=iter2,
          initialW=head_initialW,
      )
  
      mean = np.array([123.15, 115.90, 103.06], dtype=np.float32)[
          :, None, None
      ]
  
      super(FCISResNet101, self).__init__(
          extractor,
          rpn,
          head,
          mean,
          min_size,
          max_size,
          loc_normalize_mean,
          loc_normalize_std,
      )
  
      if path == "imagenet":
          self._copy_imagenet_pretrained_resnet()
      elif path:
          chainer.serializers.load_npz(path, self)
  
imports: from __future__ import division
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  from chainercv.experimental.links.model.fcis import FCIS
  from chainercv.functions import ps_roi_average_pooling_2d
  from chainercv.links import Conv2DBNActiv
  from chainercv.links.model.faster_rcnn.region_proposal_network import RegionProposalNetwork
  from chainercv.links.model.faster_rcnn.utils.loc2bbox import loc2bbox
  from chainercv.links.model.resnet.resblock import ResBlock
  from chainercv.links import ResNet101
  from chainercv import utils
label_desc: Use image node_id 1 to create a new FCISResNet101 object from inherited base classes: FCIS with example: obj = FCISResNet101(n_fg_class, pretrained_model, min_size, max_size, roi_size, group_size, ratios, anchor_scales, loc_normalize_mean, loc_normalize_std, iter2, resnet_initialW, rpn_initialW, head_initialW, proposal_creator_params)