class_docstr: A building block that consists of several Bottleneck layers.
  
  Args:
      n_layer (int): *(deprecated since v7.0.0)*
          `n_layer` is now deprecated for consistency of naming choice.
          Please use `n_layers` instead.
      n_layers (int): Number of layers used in the building block.
      in_channels (int): Number of channels of input arrays.
      mid_channels (int): Number of channels of intermediate arrays.
      out_channels (int): Number of channels of output arrays.
      stride (int or tuple of ints): Stride of filter application.
      initialW (4-D array): Initial weight value used in
          the convolutional layers.
      downsample_fb (bool): If this argument is specified as ``False``,
          it performs downsampling by placing stride 2
          on the 1x1 convolutional layers (the original MSRA ResNet).
          If this argument is specified as ``True``, it performs downsampling
          by placing stride 2 on the 3x3 convolutional layers
          (Facebook ResNet).
class_docstr_tok: ["A","building","block","that","consists","of","several","Bottleneck","layers",".","Args",":","n_layer","(","int",")",":","*","(","deprecated","since","v7.0.0",")","*","`","n_layer","`","is","now","deprecated","for","consistency","of","naming","choice",".","Please","use","`","n_layers","`","instead",".","n_layers","(","int",")",":","Number","of","layers","used","in","the","building","block",".","in_channels","(","int",")",":","Number","of","channels","of","input","arrays",".","mid_channels","(","int",")",":","Number","of","channels","of","intermediate","arrays",".","out_channels","(","int",")",":","Number","of","channels","of","output","arrays",".","stride","(","int","or","tuple","of","ints",")",":","Stride","of","filter","application",".","initialW","(","4-D","array",")",":","Initial","weight","value","used","in","the","convolutional","layers",".","downsample_fb","(","bool",")",":","If","this","argument","is","specified","as","``","False","``",",","it","performs","downsampling","by","placing","stride","2","on","the","1x1","convolutional","layers","(","the","original","MSRA","ResNet",")",".","If","this","argument","is","specified","as","``","True","``",",","it","performs","downsampling","by","placing","stride","2","on","the","3x3","convolutional","layers","(","Facebook","ResNet",")","."]
code: def __init__(
      self,
      n_layers=None,
      in_channels=None,
      mid_channels=None,
      out_channels=None,
      stride=None,
      initialW=None,
      downsample_fb=None,
      **kwargs,
  ):
      super(BuildingBlock, self).__init__()
  
      if "n_layer" in kwargs:
          warnings.warn(
              "Argument `n_layer` is deprecated. "
              "Please use `n_layers` instead",
              DeprecationWarning,
          )
          n_layers = kwargs["n_layer"]
  
      with self.init_scope():
          self.a = BottleneckA(
              in_channels,
              mid_channels,
              out_channels,
              stride,
              initialW,
              downsample_fb,
          )
          self._forward = ["a"]
          for i in range(n_layers - 1):
              name = "b{}".format(i + 1)
              bottleneck = BottleneckB(
                  out_channels, mid_channels, initialW
              )
              setattr(self, name, bottleneck)
              self._forward.append(name)
  
imports: import collections
  import os
  import sys
  import warnings
  import numpy
  import chainer
  from chainer.dataset.convert import concat_examples
  from chainer.dataset import download
  from chainer import function
  from chainer.functions.activation.relu import relu
  from chainer.functions.activation.softmax import softmax
  from chainer.functions.array.reshape import reshape
  from chainer.functions.math.sum import sum
  from chainer.functions.pooling.average_pooling_2d import average_pooling_2d
  from chainer.functions.pooling.max_pooling_nd import max_pooling_2d
  from chainer.initializers import constant
  from chainer.initializers import normal
  from chainer import link
  from chainer.links.connection.convolution_2d import Convolution2D
  from chainer.links.connection.linear import Linear
  from chainer.links.normalization.batch_normalization import BatchNormalization
  from chainer.serializers import npz
  from chainer.utils import argument
  from chainer.utils import imgproc
  from chainer.variable import Variable
label_desc: Use image node_id 1 to create a new BuildingBlock object from inherited base classes: link with example: obj = BuildingBlock(n_layers, in_channels, mid_channels, out_channels, stride, initialW, downsample_fb)