class_docstr: A bottleneck layer that reduces the resolution of the feature map.
  
  Args:
      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","bottleneck","layer","that","reduces","the","resolution","of","the","feature","map",".","Args",":","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,
      in_channels,
      mid_channels,
      out_channels,
      stride=2,
      initialW=None,
      downsample_fb=False,
  ):
      super(BottleneckA, self).__init__()
      # In the original MSRA ResNet, stride=2 is on 1x1 convolution.
      # In Facebook ResNet, stride=2 is on 3x3 convolution.
  
      stride_1x1, stride_3x3 = (
          (1, stride) if downsample_fb else (stride, 1)
      )
      with self.init_scope():
          self.conv1 = Convolution2D(
              in_channels,
              mid_channels,
              1,
              stride_1x1,
              0,
              initialW=initialW,
              nobias=True,
          )
          self.bn1 = BatchNormalization(mid_channels)
          self.conv2 = Convolution2D(
              mid_channels,
              mid_channels,
              3,
              stride_3x3,
              1,
              initialW=initialW,
              nobias=True,
          )
          self.bn2 = BatchNormalization(mid_channels)
          self.conv3 = Convolution2D(
              mid_channels,
              out_channels,
              1,
              1,
              0,
              initialW=initialW,
              nobias=True,
          )
          self.bn3 = BatchNormalization(out_channels)
          self.conv4 = Convolution2D(
              in_channels,
              out_channels,
              1,
              stride,
              0,
              initialW=initialW,
              nobias=True,
          )
          self.bn4 = BatchNormalization(out_channels)
  
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 BottleneckA object from inherited base classes: link with example: obj = BottleneckA(in_channels, mid_channels, out_channels, stride, initialW, downsample_fb)