code: def _make_layer(self, block, planes, blocks, stride=1):
      downsample = None
      if stride != 1 or self.inplanes != planes * block.expansion:
          # downsample = True
          downsample = nn.Sequential(
              nn.Conv2D(
                  self.inplanes,
                  planes * block.expansion,
                  kernel_size=1,
                  stride=stride,
                  weight_attr=ParamAttr(initializer=KaimingNormal()),
                  bias_attr=False,
              ),
              nn.BatchNorm2D(planes * block.expansion),
          )
  
      layers = []
      layers.append(block(self.inplanes, planes, stride, downsample))
      self.inplanes = planes * block.expansion
      for i in range(1, blocks):
          layers.append(block(self.inplanes, planes))
  
      return nn.Sequential(*layers)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import ParamAttr
  from paddle.nn.initializer import KaimingNormal
  import paddle.nn
  import paddle.nn.functional
  import numpy
  import math
label_desc: Use image node_id 2 for calling the ResNet45 obj's underlying member method code with example usage: obj._make_layer(block, planes, blocks, stride) and returns: nn