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 _copy_imagenet_pretrained_resnet(self):
      def _copy_conv2dbn(src, dst):
          dst.conv.W.array = src.conv.W.array
          if src.conv.b is not None and dst.conv.b is not None:
              dst.conv.b.array = src.conv.b.array
          dst.bn.gamma.array = src.bn.gamma.array
          dst.bn.beta.array = src.bn.beta.array
          dst.bn.avg_var = src.bn.avg_var
          dst.bn.avg_mean = src.bn.avg_mean
  
      def _copy_bottleneck(src, dst):
          if hasattr(src, "residual_conv"):
              _copy_conv2dbn(src.residual_conv, dst.residual_conv)
          _copy_conv2dbn(src.conv1, dst.conv1)
          _copy_conv2dbn(src.conv2, dst.conv2)
          _copy_conv2dbn(src.conv3, dst.conv3)
  
      def _copy_resblock(src, dst):
          for layer_name in src.layer_names:
              _copy_bottleneck(
                  getattr(src, layer_name), getattr(dst, layer_name)
              )
  
      pretrained_model = ResNet101(
          arch="he", pretrained_model="imagenet"
      )
      _copy_conv2dbn(pretrained_model.conv1, self.extractor.conv1)
      _copy_resblock(pretrained_model.res2, self.extractor.res2)
      _copy_resblock(pretrained_model.res3, self.extractor.res3)
      _copy_resblock(pretrained_model.res4, self.extractor.res4)
      _copy_resblock(pretrained_model.res5, self.extractor.res5)
  
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 2 for calling the FCISResNet101 obj's underlying member method code with example usage: obj._copy_imagenet_pretrained_resnet() without return types